Hello PHP Freaks,
I am using a basic payment frame system, and it requires me to pass in a GMT time in this format, in a hidden form.
"YYYYMMDDHHMMSS"
I have found a lot of examples in PHP on how to format the above tag, but what would be the easiest way to generate it as is?
To make things a little more complicated, there are different users in different GMT times, and based on the state they select it needs to + or - hours from the current time to get the GMT time.
The formulas to calculate the results are as follows, just after the best approach in PHP to calculate:
State #1: CURRENT_TIME + 10 HOURS = GMT TIME (echo as YYYYMMDDHHMMSS) and assign to $GMT_TIMESTAMP
State #2: CURRENT TIME + 9.5 HOURS = GMT TIME (echo as YYYYMMDDHHMMSS) and assign to $GMT_TIMESTAMP
What would be the best way to tackle this ? At the moment I have select boxes where the user can pick the state, then click SUBMIT.
Thankyou in advance,
D