github.com/embeddedgo/x@v0.0.6-0.20191217015414-d79a36f562e7/time/tz/america.go (about) 1 // Copyright 2019 Michal Derkacz. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package tz 6 7 import "github.com/embeddedgo/x/time" 8 9 var ( 10 EST = time.Zone{"EST", -5 * 3600} 11 EDT = time.DST{ 12 // Second Sunday in March 2:00 to first Sunday in November 3:00. 13 &time.Zone{"EDT", -4 * 3600}, 14 // Start: March 11 7:00 UTC, first Sunday this month is March 4. 15 (69*24+7)*3600 | 4<<25, 16 // End: November 4 7:00 UTC, first Sunday this month is November 4. 17 (307*24+7)*3600 | 4<<25, 18 } 19 PST = time.Zone{"PST", -8 * 3600} 20 PDT = time.DST{ 21 // Second Sunday in March 2:00 to first Sunday in November 3:00. 22 &time.Zone{"PDT", -7 * 3600}, 23 // Start: March 11 10:00 UTC, first Sunday this month is March 4. 24 (69*24+10)*3600 | 4<<25, 25 // End: November 4 10:00 UTC, first Sunday this month is November 4. 26 (307*24+10)*3600 | 4<<25, 27 } 28 ) 29 30 var ( 31 AmericaNewYork = time.Location{"America/New_York", &EST, &EDT} 32 AmericaLosAngeles = time.Location{"America/Los_Angeles", &PST, &PDT} 33 )