Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Time::Piece epoch parsing

by pme (Monsignor)
on Jul 01, 2016 at 14:27 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1166999]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-25 21:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found