$ zsh -c 'zmodload zsh/datetime strftime %FT%T.%6. For instance, in mainland Britain, it was summer time all year in 1970, but: $ TZ=Europe/London bash -c 'printf "%(%c)T\n" 0' and after : represent using a website epoch converter 1532400673 converts to GMT: Tuesday, J2:51:13 AM. Ksh93 however seems to use its own algorithm for the timezone and can get it wrong. I have some audit logs with a date stamp of the format. In ksh93 however, the argument is taken as a date expression where various and hardly documented formats are supported.įor a Unix epoch time, the syntax in ksh93 is: printf '%(%FT%T%z)T\n' '#1234567890' (where %FT%T%z is the strftime()-type format, here using standard unambiguous format which includes the UTC offset ( %z))
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |