[Numpy-discussion] UTC-based datetime64
Jim Benson
jbenson at nofs.navy.mil
Tue Sep 1 21:00:20 EDT 2015
On Tue, Sep 01, 2015 at 05:28:56PM -0700, Chris Barker wrote:
> > Googling for a way to print UTC out of the box, the best thing I could
> > find is:
> >
> > In [40]: [str(i.item()) for i in np.array([t], dtype="datetime64[s]")]
> > Out[40]: ['2015-08-26 11:52:10']
> >
> > Now, is there a better way to specify that I want the datetimes printed
> > always in UTC?
> >
>
> maybe, but it's a kludge no matter how you do it :-(
>
> It's been in the list for a while to fix this, but hasn't happened yet.
> Partly due to me not finishing writing out the notes from SciPy 2014 where
> we discussed a way forward on this.
>
> Sorry,
>
> -Chris
>
Plans for getting times in UTC1 at the ms accuracy?
Sorry, a joke, i couldn't resist.
Cheers,
Jim
>
>
>
> > Thanks,
> > --
> > Francesc Alted
> >
> > _______________________________________________
> > NumPy-Discussion mailing list
> > NumPy-Discussion at scipy.org
> > <javascript:_e(%7B%7D,'cvml','NumPy-Discussion at scipy.org');>
> > http://mail.scipy.org/mailman/listinfo/numpy-discussion
> >
> >
>
>
> --
>
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R (206) 526-6959 voice
> 7600 Sand Point Way NE (206) 526-6329 fax
> Seattle, WA 98115 (206) 526-6317 main reception
>
> Chris.Barker at noaa.gov
> <javascript:_e(%7B%7D,'cvml','Chris.Barker at noaa.gov');>
>
>
> --
>
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R (206) 526-6959 voice
> 7600 Sand Point Way NE (206) 526-6329 fax
> Seattle, WA 98115 (206) 526-6317 main reception
>
> Chris.Barker at noaa.gov
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
More information about the NumPy-Discussion
mailing list