[MacPorts] #34964: use pytz timezone during UTCDateTime.__init__ ?

MacPorts noreply at macports.org
Sun Jun 24 20:16:45 PDT 2012


#34964: use pytz timezone during UTCDateTime.__init__ ?
-----------------------------------+----------------------------------------
 Reporter:  fiveaslfa@…            |       Owner:  macports-tickets@…                   
     Type:  defect                 |      Status:  new                                  
 Priority:  Normal                 |   Milestone:                                       
Component:  ports                  |     Version:  2.1.1                                
 Keywords:                         |        Port:                                       
-----------------------------------+----------------------------------------
 We should consider using a UTC timezone provided by pytz for UTCDateTime
 objects.
 {{{
 from obspy.core import UTCDateTime
 from pytz import timezone
 tz_utc = timezone("UTC")
 tz_cet = timezone("CET")
 t = UTCDateTime(2011, 1, 1, 12, tzinfo=tz_utc)
 print t.hour
 print t.astimezone(tz_cet).hour
 t = UTCDateTime(2011, 7, 1, 12, tzinfo=tz_utc)
 print t.hour
 print t.astimezone(tz_cet).hour

 }}}
 [http://www.michaelkorsweb.com/ Michael Kors HandBags]

-- 
Ticket URL: <https://trac.macports.org/ticket/34964>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list