Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Time::Piece epoch parsing

by pme (Parson)
on Jul 01, 2016 at 14:27 UTC ( #1166999=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1166999]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2018-01-23 05:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (238 votes). Check out past polls.

    Notices?