[NumPy-Tickets] [NumPy] #2236: Option to print datetime64 in UTC instead of local timezone.

NumPy Trac numpy-tickets@scipy....
Tue Oct 30 07:38:16 CDT 2012


#2236: Option to print datetime64 in UTC instead of local timezone.
-------------------------+--------------------------------------------------
 Reporter:  sushido      |       Owner:  somebody   
     Type:  enhancement  |      Status:  new        
 Priority:  normal       |   Milestone:  Unscheduled
Component:  numpy.core   |     Version:  devel      
 Keywords:  datetime64   |  
-------------------------+--------------------------------------------------
 Allow the user to specify that datetime64 objects are printed in UTC and
 not in local timezone.
 Currently we have:
 {{{
 >>> print np.datetime64('2012-01-02T01:02Z')
 2012-01-02T03:02+0200
 }}}
 But I would like to be able to get:
 {{{
 >>> print np.datetime64('2012-01-02T01:02Z')
 2012-01-02T01:02+0000
 }}}

 I understand that according to some ISO standard, dates should be printed
 in local timezone, but it makes life difficult, so an option to print in
 UTC would be welcomed.

 I would also appreciate if someone showed a workaround that prints UTC
 while this enhancement is being considered.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/2236>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list