-
Gmt time
Hi
I'm trying to create a simple guest book, which should also write the date&time of the post, in the following way: 04/08/08 13:50.
In a regular PHP code I'm using GMT in order to see the right date&time, but here I don't really know what's the best way to store this kind of data in my database, and then print it, in this structure: 04/08/08 13:50.
-
-
I would recommend using a UNIX timestamp. Then use the date function to format it the way you want.
Hope this helps.
-
The Following User Says Thank You to thetestingsite For This Useful Post:
-
I am using what testing said, I save everything as the unix timestamp using time()
Then when you want to display, use date( format [, timestamp ] )
In all the examples I see, the timestamp is set using mktime, but I went and did my own testing and it can jsut be a unix timestamp.
-
The Following User Says Thank You to motormichael12 For This Useful Post:
-
Thank you, I'll check this out!
-
-
Or convert it in the sql query, by using date_format()
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks