General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 14th, 2003, 07:38 PM
Alicia Alicia is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 116 Alicia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 49 sec
Reputation Power: 5
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.

Reply With Quote
  #2  
Old November 15th, 2003, 04:24 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 6
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-

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > mktime function


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway