in reply to Time::Piece epoch parsing

Hi vsespb,

strptime() called from language C gives the very same result.

/* cc -Wall -g strp.c -o strp */ #define _XOPEN_SOURCE #include <time.h> #include <stdio.h> int main(int argc, char *argv[]) { struct tm tm; char *c; c = strptime(argv[1], "%s", &tm); printf("%s", asctime(&tm)); return 0; }
Run:
$ TZ=MSK ./strp 1415998800 Fri Nov 14 21:00:00 2014

Replies are listed 'Best First'.
Re^2: Time::Piece epoch parsing
by Anonymous Monk on Jul 01, 2016 at 15:56 UTC

    Not really:

    $ TZ=Europe/Moscow ./strp 1415998800 Sat Nov 15 00:00:00 2014