


For instance, in mainland Britain, it was summer time all year in 1970, but: $ TZ=Europe/London bash -c 'printf "%(%c)T\n" 0' Ksh93 however seems to use its own algorithm for the timezone and can get it wrong. Hello,Is it possible to convert the value of a variable which in this case is a UNIX timestamp into a UTC Date I need to do this within the formula section. 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)) Enter a Timestamp Supports Unix timestamps in seconds, milliseconds, microseconds and nanoseconds. The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since Janu(midnight UTC/GMT), not counting. With bash-4.2 or above: $ printf '%(%FT%T%z)T\n' 1234567890 Convert epoch to human-readable date and vice versa.
