parkourmumbai
New Member
- Messages
- 34
- Reaction score
- 0
- Points
- 0
Seeing as no one seems to notice my second issue in the other thread, I'm creating a new one here in the hopes that people will see and respond ti the relevant problem over here. I have also done a cursory search on the boards, and didn't find anything pertaining to my issue.
Simply put, I am a total noob when it comes to converting dates and times across timezones, even in the offline world. And I still don't even know what daylight saving really is, and how it is implemented, since I don't come from a daylight saving country.
I'm located in India, and from what I can make out, the x10 hosting servers are located in New York, USA.
In one of my forms, I have a feature that captures the current date and time (preferably of the timezone GMT +05:30, Indian Standard Time) at the time of hitting the submit button, and inserts it into a 'datetime' datatype field in the backend database, along with the other information.
Now since the x10 servers are located in the USA, I can't use the time() or the date() functions to capture the datetime values, as I would still need to work on the data captured to convert it to my timezone.
Could someone please help me with a function(s) to convert the datetime to reflect the accurate timezone in my country, or if there are built-in functions in php/mysql to accomplish this, by pointing me to those and how to use them, at the same time providing for the daylight saving adjustment that would be applied to the cossacks server for the specific months every year?
I'm being very specific here -
I want to capture the current date and time on the cossacks server and convert it to the current date and time as per the Indian Standard Time, which is GMT + 05:30 hours, and at the same, time make some provision for daylight savings, whenever in the year it is implemented on cossacks for a period of time, without having to recode when daylight savings is in effect on cossacks. Then I want to parse it in the correct format for entering a 'datetime' value in mysql, and pass it onto a parameterized query for inserting into the database.
I have already searched for this thing high and low on google, and couldn't find anything to help me.
Any help here would be appreciated. Thanks in advance.
Simply put, I am a total noob when it comes to converting dates and times across timezones, even in the offline world. And I still don't even know what daylight saving really is, and how it is implemented, since I don't come from a daylight saving country.
I'm located in India, and from what I can make out, the x10 hosting servers are located in New York, USA.
In one of my forms, I have a feature that captures the current date and time (preferably of the timezone GMT +05:30, Indian Standard Time) at the time of hitting the submit button, and inserts it into a 'datetime' datatype field in the backend database, along with the other information.
Now since the x10 servers are located in the USA, I can't use the time() or the date() functions to capture the datetime values, as I would still need to work on the data captured to convert it to my timezone.
Could someone please help me with a function(s) to convert the datetime to reflect the accurate timezone in my country, or if there are built-in functions in php/mysql to accomplish this, by pointing me to those and how to use them, at the same time providing for the daylight saving adjustment that would be applied to the cossacks server for the specific months every year?
I'm being very specific here -
I want to capture the current date and time on the cossacks server and convert it to the current date and time as per the Indian Standard Time, which is GMT + 05:30 hours, and at the same, time make some provision for daylight savings, whenever in the year it is implemented on cossacks for a period of time, without having to recode when daylight savings is in effect on cossacks. Then I want to parse it in the correct format for entering a 'datetime' value in mysql, and pass it onto a parameterized query for inserting into the database.
I have already searched for this thing high and low on google, and couldn't find anything to help me.
Any help here would be appreciated. Thanks in advance.