<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City" /><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place" /><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName" /><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]--><style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Bookman Old Style";
        panose-1:2 5 6 4 5 5 5 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="Section1">
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">Hmm&#8230; Well actually the strtotime function returns the current time in the &#8220;default&#8221; timezone by default. &nbsp;The default timezone is not
 necessarily your php.ini file&#8217;s timezone as it can be overridden with a call to the php function date_timezone_set.&nbsp; Everyone have a headache yet?
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">The best way to determine which timezone is affected by strtotime() is to stick in a command like (assuming
 you have the devel module enabled): dsm(</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
&quot;Courier New&quot;;color:black">date_default_timezone_get());&nbsp;&nbsp;
<o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">On my drupal installation this does not return GMT number. &nbsp;So what you want to do if you want GMT time is
 to append &#8220;GMT&#8221; to the time. &nbsp;&nbsp;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black">Check out the following code snippet:
<o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black">&nbsp; $output =
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:#0000C0">'&lt;pre&gt;'</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black">;</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black">&nbsp; $output .= date_default_timezone_get() .
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;
font-family:&quot;Courier New&quot;;color:#0000C0">&quot;\n&quot;</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
&quot;Courier New&quot;;color:black">;</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black">&nbsp; $output .= strtotime(</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:
&quot;Courier New&quot;;color:#0000C0">'January
 1 1970 00:00:0'</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
&quot;Courier New&quot;;color:black">).
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:#0000C0">&quot;\n&quot;</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black">;</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black">&nbsp; $output .= strtotime(</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:
&quot;Courier New&quot;;color:#0000C0">'January
 1 1970 GMT'</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black">) .
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#0000C0">&quot;\n&quot;</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
&quot;Courier New&quot;;color:black">;</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black">&nbsp; $output .=
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:#0000C0">'&lt;/pre&gt;'</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black">;<o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black">On my box this returns.
<o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black"><o:p>&nbsp;</o:p></span></font></p>
<pre style="mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;
margin-left:0in;line-height:18.0pt"><font size="3" color="black" face="Courier New"><span style="font-size:12.0pt;color:black">America/Los_Angeles<br>
28800<br>
0<o:p></o:p></span></font></pre>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">Hope that helps.
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p>&nbsp;</o:p></span></font></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">
<hr size="2" width="100%" align="center" tabindex="-1">
</span></font></div>
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size:10.0pt;
font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma"> support-bounces@drupal.org [mailto:support-bounces@drupal.org]
<b><span style="font-weight:bold">On Behalf Of </span></b><st1:PersonName w:st="on">Ms. Nancy Wichmann</st1:PersonName><br>
<b><span style="font-weight:bold">Sent:</span></b> Thursday, February 28, 2013 7:55 AM<br>
<b><span style="font-weight:bold">To:</span></b> support drupal<br>
<b><span style="font-weight:bold">Subject:</span></b> [support] Time Zones</span></font><o:p></o:p></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>
<div>
<div>
<p class="MsoNormal" style="background:white"><font size="3" color="black" face="Arial"><span style="font-size:12.0pt;font-family:Arial;color:black">Being blond, confusion is my normal state, but time zones are threatening to ruin what's left of my mental health.<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" color="black" face="Arial"><span style="font-size:
12.0pt;font-family:Arial;color:black"><o:p>&nbsp;</o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" color="black" face="Arial"><span style="font-size:
12.0pt;font-family:Arial;color:black">In D7, we set the site's default time zone (America/New_York for me). Since it then displays the correct time, I have to assume that
 the server is running on GMT. Is that correct?<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" color="black" face="Arial"><span style="font-size:
12.0pt;font-family:Arial;color:black"><o:p>&nbsp;</o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" color="black" face="Arial"><span style="font-size:
12.0pt;font-family:Arial;color:black">If I read the PHP manual correctly, the strtotime() function will create a GMT time. Is that correct?
<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" color="black" face="Arial"><span style="font-size:
12.0pt;font-family:Arial;color:black"><o:p>&nbsp;</o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" color="black" face="Arial"><span style="font-size:
12.0pt;font-family:Arial;color:black">So if I ask the user to tell me their timezone when they enter a time, I can stick that on the end of the string that I pass to strtotime()
 and get a GMT timestamp?<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><font size="3" color="black" face="Arial"><span style="font-size:12.0pt;font-family:Arial;color:black">&nbsp;<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><st1:City w:st="on"><st1:place w:st="on"><b><i><font size="4" color="#ff007f" face="Bookman Old Style"><span style="font-size:13.5pt;font-family:&quot;Bookman Old Style&quot;;color:#FF007F;
  font-weight:bold;font-style:italic">Nancy</span></font></i></b></st1:place></st1:City><font color="black" face="Arial"><span style="font-family:Arial;color:black"><o:p></o:p></span></font></p>
</div>
<p class="MsoNormal" style="background:white"><font size="3" color="black" face="Arial"><span style="font-size:12.0pt;font-family:Arial;color:black"><o:p>&nbsp;</o:p></span></font></p>
</div>
</div>
</body>
</html>