github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/extern/time/time.gno (about) 1 package time 2 3 type Time struct { 4 wall uint64 5 ext int64 6 loc *Location 7 } 8 9 // XXX dummy 10 func (t Time) Minute() int { 11 return int(1111) 12 } 13 14 // XXX dummy 15 func (t Time) Second() int { 16 return int(2222) 17 } 18 19 // XXX dummy 20 func Date(year int, month Month, day, hour, min, sec, nsec int, loc *Location) Time { 21 return Time{ 22 wall: 0, 23 ext: 0, 24 loc: nil, 25 } 26 } 27 28 var ( 29 UTC *Location = &utcLoc 30 utcLoc = Location{name: "UTC"} 31 ) 32 33 type Location struct { 34 name string 35 zone []zone 36 tx []zoneTrans 37 extend string 38 cacheStart int64 39 cacheEnd int64 40 cacheZone *zone 41 } 42 43 type zone struct { 44 name string 45 offset int 46 isDST bool 47 } 48 49 type zoneTrans struct { 50 when int64 51 index uint8 52 isstd, isutc bool 53 } 54 55 type Month int 56 57 const ( 58 January Month = 1 + iota 59 February 60 March 61 April 62 May 63 June 64 July 65 August 66 September 67 October 68 November 69 December 70 )