C built-in function for a Bash script
Bash script
now=`date "+%s"` The above Bash script convert today 's date to a number. 1) Are the year, month, date, hour, minutes, seconds and thousands of a second involved in this conversion ? 2) What is the mathematical formular for this conversion ? 3) What is the C built-in function for the above Bash script ? |
This is a 32 bit unsigned integer representing the number of seconds since what is called the epoch, January the 1st, 1970 UTC.
|
Re: C built-in function for a Bash script
Quote:
Or in C using the gettimeofday() function. Quote:
Quote:
Code:
#include <stdio.h> |
reply
jlliagre, and Hko. Thank you both for your help.
|
All times are GMT -5. The time now is 01:12 AM. |