Top.Mail.Ru
? ?

Entries by tag: unix

if (time() == 1234567890) celebrate();

Disclaimer:This post is not really related to OpenVZ, but who cares? I don't... :) So from now on I will be writing more here, on just about everything.

In UNIX systems, system time is accounted as a number of seconds since so-called "UNIX epoch" -- 1 January 1970 00:00:00 UTC. This number of seconds is returned by system call time(), plus there are library routines to convert it to more human-appealing formats.

You can guess the number is pretty big nowdays, incrementing every second. In fact, it's already over a million seconds, and in about 1 hour it will be equal to 1234567890. For some people this is a good enough reason to have a beer or two in a good company. Check http://www.1234567890day.com/ for 1234567890 parties around the globe. As for myself, I will just watch the number growing. Some kind of a meditation, similar to staring at an open fire, or flowing water, or people at work... I can do that for hours! Just kidding...

On Linux, you can see the current time() using date +%s command. Enjoy.

Tags:

Latest Month

July 2016
S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
31      

Syndicate

RSS Atom

Comments

Powered by LiveJournal.com
Designed by Tiffany Chow