|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
mktime function
Hi guys,
I got a doubt regarding mktime function. I hope you guys can help.. My time 7.20pm, date 14th Nov 2003 when i echo mktime(), the following info displayed. 1068809270 i was told this something related to January 1 1970... i dun have any idea what they are talking about, .. This is one of the example my friend sent to me: 1041379200 = Wed, 1 Jan 2003 00:00:00 UTC they said i can even use strftime() to have a better idea about the UNIX timestamp I am really confuse about all of these.. May i know how to read the info displayed... it doesn't really make sense to me... everytime i refresh, the last two digits keep on changing,, i guess that should be second where as the 3rd last digit should be minute... but i am not so sure about the rest.. could you guys give me an idea how to read the timestamp ? If the host server is not administer by my own company staff, is it possible to ask them to change the timestamp of their UNIX server? by the way, is there anyway i can do to manipulate the mktime output ? Please advise. |
|
#2
|
|||
|
|||
|
The unix timestamp format is the number of seconds since the 1st of january 1970 and is a common format for storing date/time information even if you're not working under unix.
Functions such as mktime return the unix timestamp either for a given date/time or the current one for example. If you find it changes every time you refresh then I'd imagine you're getting the current timestamp which does of course increase each time. I suggest reading on up date/time functions at php.org since their explanations and examples will be far more informative then the couple I could list. Hope this helps, -KM- |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > mktime function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|