How to convert UNIX epoch to date format for u se in Alerts?
Steve Burton
steve at sliderule.demon.co.uk
Wed Dec 18 21:59:23 CET 2002
Olaf Greis wrote:
>
> > The only problem now is that $LASTSTATECHANGE$ is in UNIX epoch format.
> > How does one convert this to readable format ?
>
> perl -e 'print scalar localtime(1234567890)' is one of the possible solutions.
>
under FreeBSD (at least) date -r <unixtimeseconds> does the same.
Steve.
> brdgs
> olaf
>
> -------------------------------------------------------
> This sf.net email is sponsored by:
> With Great Power, Comes Great Responsibility
> Learn to use your power at OSDN's High Performance Computing Channel
> http://hpc.devchannel.org/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
--
Steve Burton
Webmaster & Sub-optimal Coder
-------------------------------------------------------
This SF.NET email is sponsored by: Order your Holiday Geek Presents Now!
Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap,
MP3 Players, XBox Games, Flying Saucers, WebCams, Smart Putty.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/
More information about the Users
mailing list