Java applet that displays time.
Welcome on Jérôme Boismartel home page
Version française English version
Home
Home Page
My C.V.s
French C.V.
English C.V.
SysAdmin corner
Tips and tricks
Java Programs
L280 Configuration
4900Z and Linux
Barcode generation
Date conversion
Unix Scripts
Unix Monitoring
Progress Monitoring
Alarm System
My pictures
Baby pictures
-------------
England
France
Taiwan
Haiti
My links
Ressources

Converting a date to unix epoch

Here is a very simple C program that will allow you to convert a date to the Unix epoch (number of seconds since 1st of January 1970). Click here to download it.To compile it, use the following syntax :
gcc date2epoch.c -o date2epoch
If we run it without argument, we see the usage below :
Usage: ./date2epoch date
Where date is specified according to date mask file.
eg. : if you want to specify a date as 11/11/03 12:39, you need
to create a file datemsk with the string "%D %H:%M", then export
the date file mask with the command : export DATEMSK=/path/datemsk
Then, call this program with the following command :
./date2epoch "`date "+%D %H:%M"`" or ./date2epoch "11/11/03 12:39"

So, in order to use it, we need to create a datemsk file with the following command :
echo "%D %H:%M" > /usr/local/bin/datemsk
You can choose any format as long as you remember it when you will run date2epoch.

Opened window on Montréal
To contact me...
My prefered email address is jerome.boismartel@gmail.com.
St-Malo time
Java applet that displays time.
Kaohsiung time
Java applet that displays time.
Samoa time
Java applet that displays time.