Jump to content

Subtracting days, changing time zones


johng

Recommended Posts

I am working on a project where someone will enter data in India, and people in the Central Time zone will get that information and use it.  I would like to have the people in India be able to enter it using their time, and people in the CST zone be able to search for it and use it in a report in CST.  I have got the time difference figured out just fine, I just cannot for the life of me figure out how to change the day (on some days the India day will be one day ahead of CST).

 

Otherwise, if it would work, I would have it store the time and date as GMT, and then spit it out as CST and IST.  I would then need to parse out the date and time, each to be able to search by separately.

 

Any help will be much appreciated, as this has already consumed a great deal of my time and frustration level.

 

I don't know if you want code, because I don't really have any that is working right now, and I haven't found a function that will work. 

 

Thanks in advance.

 

-John G.

 

EDIT:  I am storing the data in a sql database right now, and storing the time and date separately so I can search by day, and by time.  I don't know if that added information helps at all, but I hope at least it doesn't hurt.

Link to comment
https://forums.phpfreaks.com/topic/40525-subtracting-days-changing-time-zones/
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.