Jump to content

date problem


robert_gsfame

Recommended Posts

let say i have date("Y-m-d, H:i") and assume it was

$date=2010-09-03, 11:00

 

and i wish to find the difference between $date and today's date

 

actually i know how to find it but it always depends on each user's computer date

how can i get a fix result so that each user will have the same result even if they try to change their computer date

 

thx

Link to comment
https://forums.phpfreaks.com/topic/207317-date-problem/
Share on other sites

PHP can't access the users computer date directly. You'll need input from the user. Get the users timezone, which is what they'll have to input. Then you can use gmdate and add or subtract the timezone offset for the users input.

 

Some people won't select their timezone, that's their problem. There's nothing you can do about it.

Link to comment
https://forums.phpfreaks.com/topic/207317-date-problem/#findComment-1083916
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.