Convert Time Zone: Difference between revisions
Jump to navigation
Jump to search
Jkuehlthau (talk | contribs) No edit summary |
Jkuehlthau (talk | contribs) No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<source lang=" | <source lang="csharp"> | ||
object ScriptedField() | object ScriptedField() | ||
{ | { | ||
Line 7: | Line 7: | ||
return TimeZoneInfo.ConvertTime(dt, TimeZoneInfo.Utc, timeInfo); | return TimeZoneInfo.ConvertTime(dt, TimeZoneInfo.Utc, timeInfo); | ||
} | } | ||
</ | </source> |
Latest revision as of 15:45, 6 July 2016
object ScriptedField() { String source = Starfish.OriginData["DATETIMERECEIVED"].ToString(); DateTime dt = Convert.ToDateTime(source); TimeZoneInfo timeInfo = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time"); return TimeZoneInfo.ConvertTime(dt, TimeZoneInfo.Utc, timeInfo); }