<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.method.me/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Method:API Q&amp;A</title><link>http://forums.method.me/cs/forums/15.aspx</link><description>Ask questions specific to the MethodAPI from the Method Team and other Method users.</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 SP2 (Build: 31113.47)</generator><item><title>Re: Time Zone Problem</title><link>http://forums.method.me/cs/forums/thread/3297.aspx</link><pubDate>Fri, 27 Aug 2010 13:52:04 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:3297</guid><dc:creator>Method_Victor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/3297.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=15&amp;PostID=3297</wfw:commentRss><description>&lt;p&gt;Hi Seny,&lt;/p&gt;
&lt;p&gt;We&amp;#39;ve looked into the problem of MethodAPISelect_DataSetV2 returning date in the incorrect timezone, we&amp;#39;ve applied a fix, and now, the DataSets are always going to be returned in UTC time. If at any point you would prefer to use MethodAPISelect_XMLV2, you will be happy to find out that it also returns dates in UTC time.&lt;br /&gt;&lt;br /&gt;Thank you&lt;br /&gt;Victor&lt;/p&gt;</description></item><item><title>Re: Time Zone Problem</title><link>http://forums.method.me/cs/forums/thread/3276.aspx</link><pubDate>Wed, 25 Aug 2010 17:21:53 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:3276</guid><dc:creator>seny</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/3276.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=15&amp;PostID=3276</wfw:commentRss><description>&lt;p&gt;When I insert into a date time field using the API, I am passing the UTC time, and in Method itself it displays the right time. However, when I use MethodAPISelect_DataSetV2 to get the time back, there is a 5-hour difference. For example, in Method it displays Aug 25 2010 10:09 AM and in my own application it displays Aug 25 2010 03:09 PM. Our time zone is (UTC-08:00) Pacific Time (US &amp;amp; Canada). Should the difference be 8 hours, instead of 5 hours? Or since it is daylight saving time, should it be 7 hours?&lt;/p&gt;
&lt;p&gt;I have not tested the MethodAPISelect_XML yet, but I like using MethodAPISelect_DataSetV2 more than the XML version, as I can just pass the dataset from the MethodAPISelect_DataSetV2 to my GridView, where for the XML version I have to do extra work.&lt;/p&gt;
&lt;p&gt;Is that possible to make the MethodAPISelect_DataSetV2 return the UTC time?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Time Zone Problem</title><link>http://forums.method.me/cs/forums/thread/1753.aspx</link><pubDate>Tue, 01 Dec 2009 16:36:05 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:1753</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/1753.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=15&amp;PostID=1753</wfw:commentRss><description>&lt;p&gt;Matt,&lt;/p&gt;
&lt;p&gt;All date/time values are stored in the database as UTC time. When a user logs into Method, the user&amp;#39;s local time zone is determined as well as if Daylight Savings Time is currently in affect from the browser on the computer.&amp;nbsp; The offset amount, in minutes, is used on each screen. &lt;/p&gt;
&lt;p&gt;This offset amount adjust the UTC time stored in the database to the local time whenever you show the information in a grid or a field on the screen.&amp;nbsp; So the time changes will be shown properly when DST shifts.&lt;/p&gt;
&lt;p&gt;Now I went through some example trying to set values in the past through the API. I was using VB.net. If I set the time to&amp;nbsp;July (7/1/1980 00:00:00)&amp;nbsp;and then convert to UTC, the time showed correctly in Method.&amp;nbsp;If I did the same for January (1/1/1980 00:00:00), the UTC time was off by one hour. I checked the database and the UTC time was off by one hour for January.&amp;nbsp; So it appears .NET is performing a DST offset automatically when calculating the UTC time.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;So when creating the time in the past, you may have to make the adjustments before sending the information to the API.&lt;/p&gt;
&lt;p&gt;If you need to query the information from the database, use the MethodAPISelect_XML and you&amp;#39;ll see the UTC record for date/time fields.&lt;/p&gt;
&lt;p&gt;If there is anything else I can help you with/clarify please let me know.&lt;/p&gt;
&lt;p&gt;Peter&lt;/p&gt;</description></item><item><title>Re: Time Zone Problem</title><link>http://forums.method.me/cs/forums/thread/1714.aspx</link><pubDate>Mon, 23 Nov 2009 13:25:21 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:1714</guid><dc:creator>Matt</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/1714.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=15&amp;PostID=1714</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Peter,&lt;/p&gt;
&lt;p&gt;How does Method account for daylight saving when displaying the information back? I have quite a few jobs that were transferred with a start date of Jan 1, 1980 12:00 am. Now in QXO I have a&amp;nbsp; bunch of jobs with the due date start of Dec 31, 1979 11:00 pm. It is possible that those jobs were transferred in the day or 2 before I corrected the problem, but it looked like there was too many.&lt;/p&gt;
&lt;p&gt;My concern is that if the is a 5 hour time difference when I transfer the data and then 6 months later the time changes... is the time still going to show correctly? &lt;/p&gt;</description></item><item><title>Re: Time Zone Problem</title><link>http://forums.method.me/cs/forums/thread/1685.aspx</link><pubDate>Wed, 11 Nov 2009 14:27:22 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:1685</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/1685.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=15&amp;PostID=1685</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Matt,&lt;/p&gt;
&lt;p&gt;That&amp;#39;s the way Method saves information as well. We find the Time Zone from the user&amp;#39;s browser and then add 60 if there must be an adjustment based for daylight savings time.&lt;/p&gt;
&lt;p&gt;Peter&lt;/p&gt;</description></item><item><title>Re: Time Zone Problem</title><link>http://forums.method.me/cs/forums/thread/1676.aspx</link><pubDate>Mon, 09 Nov 2009 22:05:15 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:1676</guid><dc:creator>Matt</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/1676.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=15&amp;PostID=1676</wfw:commentRss><description>&lt;p&gt;Peter,&lt;/p&gt;
&lt;p&gt;Here is the code I am using to convert the time:&lt;/p&gt;
&lt;p&gt;Dim d As Integer&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim mo As Integer&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim yr As Integer&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim hr As Integer&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim min As Integer&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim sec As Integer&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim mil As Integer&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim OldDateTime As Date&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OldDateTime = sInput&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d = OldDateTime.Day&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mo = OldDateTime.Month&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yr = OldDateTime.Year&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hr = OldDateTime.Hour + txtTimeAdjust.Text&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If hr &amp;gt; 23 Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hr = hr - 24&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min = OldDateTime.Minute&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sec = OldDateTime.Second&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mil = OldDateTime.Millisecond&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fnTimeZone = mo &amp;amp; &amp;quot;/&amp;quot; &amp;amp; d &amp;amp; &amp;quot;/&amp;quot; &amp;amp; yr &amp;amp; &amp;quot; &amp;quot; &amp;amp; hr &amp;amp; &amp;quot;:&amp;quot; &amp;amp; min &amp;amp; &amp;quot;:&amp;quot; &amp;amp; sec&lt;/p&gt;
&lt;p&gt;the txtTimeAdjust is an integer based on the time zone &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If comboTimeZone.SelectedItem = &amp;quot;Eastern&amp;quot; Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Form2.txtTimeAdjust.Text = &amp;quot;5&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If comboTimeZone.SelectedItem = &amp;quot;Central&amp;quot; Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Form2.txtTimeAdjust.Text = &amp;quot;6&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If comboTimeZone.SelectedItem = &amp;quot;Mountain&amp;quot; Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Form2.txtTimeAdjust.Text = &amp;quot;7&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If comboTimeZone.SelectedItem = &amp;quot;Pacific&amp;quot; Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Form2.txtTimeAdjust.Text = &amp;quot;8&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/p&gt;
&lt;p&gt;I had to add 1 to each of these the day after the time change to have the times be correct. Items that I transferred before the daylight savings switch are all now 1 hour earlier. If there is a better way, please let me know.&lt;/p&gt;</description></item><item><title>Re: Time Zone Problem</title><link>http://forums.method.me/cs/forums/thread/1675.aspx</link><pubDate>Mon, 09 Nov 2009 21:51:12 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:1675</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/1675.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=15&amp;PostID=1675</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Matt,&lt;/p&gt;
&lt;p&gt;How are you adjusting for the time zone? Are you converting the date to UTC time or just adjusting the time?&lt;/p&gt;
&lt;p&gt;If you can send some sample code of how you are generating the date that would be helpfull.&lt;/p&gt;
&lt;p&gt;Peter&lt;/p&gt;</description></item><item><title>Time Zone Problem</title><link>http://forums.method.me/cs/forums/thread/1622.aspx</link><pubDate>Wed, 04 Nov 2009 14:36:40 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:1622</guid><dc:creator>Matt</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/1622.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=15&amp;PostID=1622</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I am using the API Insert/Update to insert the duedatestart(activity table)&amp;nbsp;field. In order to get the time portion to be correct, I need to adjust for the difference in time zones. That worked fine until the time changed this past weekend. Now everything that gets updated is an hour off. Any suggestions on the best way to handle this?&lt;/p&gt;</description></item></channel></rss>