{"id":1556,"date":"2006-01-30T08:03:00","date_gmt":"2006-01-29T21:03:00","guid":{"rendered":"http:\/\/new.radio-active.net.au\/web3\/1556\/"},"modified":"2014-10-10T12:28:10","modified_gmt":"2014-10-10T01:28:10","slug":"1556","status":"publish","type":"post","link":"http:\/\/www.radio-active.net.au\/web3\/1556","title":{"rendered":""},"content":{"rendered":"<p>One of the unintended consequences of tidying my desk is that I now have a couple of speakers evenly on both sides of my laptop so I am now getting the full stereo effect in music. It really is surprising how much better music sounds in stereo &#8211; although wearing headphones is even better.<\/p>\n<p>I have been working on a bug with some software for a while&#8230; It is with date parsing. The system can send me data in two different formats. And VB.NET has an issue&#8230; I am importing data and it thinks it is in the local timezone, but the data is in UTC, or universal time. This is creating a few hassles for me. The problem is that I have solved this before and I cannot remember how I did it. I do know it was a pain to solve. <\/p>\n<p>After some playing I found the following line&#8230;<br \/>    TimeZone.CurrentTimeZone.GetUtcOffset(Now).TotalMinutes<br \/>What this does on the .Net world is returns the number of seconds between UTC time and local time. So if I import data with the wrong timezone I can offset things. So simple&#8230; Provided I can work out if to add or subtract from the time&#8230;<\/p>\n<p>P.S. Edit 30 minutes later&#8230; An issue\/Bug..<\/p>\n<p>Firstly I had an issue with the following line<br \/>   time = Date.ParseExact(mArray(Fields.Time), &#8220;dd\/MM\/yyyy H:mm:ss tt&#8221;, Nothing)<br \/>The tt understands AM or PM. Unfortunately it then ignores AM or PM. Probably something to do with the H in the hour field. But the following code fixed things&#8230; <br \/>   If InStr(mArray(Fields.Time), &#8220;PM&#8221;) > 0 Then<br \/>                    time = time.AddHours(12)<br \/>   End If<\/p>\n<p>Why isnt programming easy? ARGH!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the unintended consequences of tidying my desk is that I now have a couple of speakers evenly on both sides of my laptop so I am now getting the full stereo effect in music. It really is surprising &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"http:\/\/www.radio-active.net.au\/web3\/1556\">  Read More &raquo;<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s5cfmK-1556","_links":{"self":[{"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/posts\/1556"}],"collection":[{"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/comments?post=1556"}],"version-history":[{"count":0,"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/posts\/1556\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/media?parent=1556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/categories?post=1556"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/tags?post=1556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}