Im working w/ an api and my own code ive written to allow me to submit to that api, and I am trying to create a series of forms which will allow me to schedule actions via the API.
Basically, Im located in MST time zone (Mountain standard time), and the submission is required to be in GST (greenwich mean time) - So basically it has to look like this -
= Apr 06, 2010 15:09:02 MST (Tomorrow at 3:09, I believe.)
So anyways, I only need to schedule actions say 10 days in advance, and would like the select input to recognize the current day, and offer 10 days out worth of dates. (So, 2010-04-06. 4/6/2010, etc), but the tricky part is this. I want it to show the options in MST, but have the actual values set as the GST equivelant times.
I basically need one select menu for the date, another for time. The trouble is the conversion of the actual values, as if I select 4-6/2010, depending on the time, it may actually be a completely different day. So I attached code sample of what I have so far below, Im thinking there is probably a much more effective/ez way to do this with php because I saw there are time conversion functions, I just dont know how to use them. (i still have much to learn..)
Thanks in advance.
$day0 = mktime(0,0,0,date("m"),date("d"),date("Y"));
$day0option = "<option value='";
$day0option .= date("Y-m-d", $day0);
$day0option .= "'>";
$day0option .= "Today - ".date("Y-m-d", $day0);
$day0option .= "</option>";
$day1 = mktime(0,0,0,date("m"),date("d")+1,date("Y"));
$day1option = "<option value='";
$day1option .= date("Y-m-d", $day1);
$day1option .= "'>";
$day1option .= "Tomorrow - ".date("Y-m-d", $day1);
$day1option .= "</option>";
<option value="00:00:00">12:00 AM</option>
<option value="01:00:00">1:00 AM</option>
<option value="02:00:00">2:00 AM</option>