Welcome Guest, Not a member yet? Register   Sign In
Date and time help!
#5

[eluser]Assim[/eluser]
What I'm trying to do is store date and time for different things like user posts, or pages, or events, and everything and anything that requires date and time. So for the example, let's say a user posts a post in my website, how can I store the date and time?

[quote author="dmorin" date="1267041223"] If you're worried about changing DB servers and that giving you bad times because of the way MySQL stores dates and times, then just store unix time stamps as integers instead since these are always in UTC and it's easy to convert them to and from any format or timezone.[/quote]
That seems to be a reasonable solution, could you tell me how I do the following:
- Store in unix timestamps
- Convert them to any format or timezone
- Comparing date and times

If explaining was hard, do you have any newbie guide for the using unix timestamps in PHP and MySQL (one that you recommend)?

Thanks.


Messages In This Thread
Date and time help! - by El Forum - 02-23-2010, 11:04 AM
Date and time help! - by El Forum - 02-23-2010, 06:07 PM
Date and time help! - by El Forum - 02-24-2010, 02:09 AM
Date and time help! - by El Forum - 02-24-2010, 07:53 AM
Date and time help! - by El Forum - 02-24-2010, 11:30 AM
Date and time help! - by El Forum - 02-24-2010, 11:38 AM
Date and time help! - by El Forum - 02-24-2010, 11:45 AM
Date and time help! - by El Forum - 02-24-2010, 11:55 AM
Date and time help! - by El Forum - 02-24-2010, 12:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB