datetimeoffset Questions

6

Solved

I'm trying to use DateTimeOffset to convey a specific moment in time across any time zone. I can't figure out how to use TimeZoneInfo to deal with daylight saving time. var dt = DateTime.UtcNow; C...
Eusebiaeusebio asked 2/6, 2010 at 21:45

6

I have a Java class that takes in the latitude/longitude of a location and returns the GMT offset when daylight savings time is on and off. I am looking for an easy way to determine in Java if the ...
Monah asked 29/6, 2009 at 20:52

2

Solved

I am having a problem with retrieving a DateTimeOffset from a PostgreSQL database using Entity Framework. As far as researching the problem, I found this article that helps me understand what the p...
Paxon asked 18/3, 2015 at 16:13

4

Solved

I need to convert UTC date strings to DateTimeOffsets. This must work with a timezone which differs from the computers timezone. E.g. current computer timezone is +02:00, but I want to create a Da...
Abstain asked 18/12, 2012 at 13:2

7

Solved

I am confused how pandas blew out of bounds for datetime objects with these lines: import pandas as pd BOMoffset = pd.tseries.offsets.MonthBegin() # here some code sets the all_treatments datafram...
Paramour asked 1/10, 2015 at 12:54

4

Solved

In MVC4 C# application I used DateTime.Now when object created in my application. After deploying, there was +8 hours difference between local computer and hosting. Then I changed it to DateTime.Ut...
Hypoxanthine asked 20/3, 2013 at 10:41

9

Solved

I'm using json.net to deserialize a DateTimeOffset, but it is ignoring the specified timezone and converting the datetime to the local offset. For example, given var content = @"{""startDateTime""...
Anesthetize asked 19/7, 2012 at 4:3

7

Solved

I'm hoping to convert a table which has a DATETIMEOFFSET field, down to a DATETIME field BUT recalculates the time by taking notice of the offset. This, in effect, converts the value to UTC. eg. ...
Liquorish asked 10/2, 2011 at 6:1

4

Solved

I'm using QuickBooks Web Connector to pull employee records out of QuickBooks Desktop on a Windows 8.1 machine using QBXML requests. Is there a reason the TimeModified time stamps are returning an ...
Congeries asked 27/3, 2014 at 18:19

3

Solved

I have DateTimeOffset: DateTimeOffset myDTO = DateTimeOffset.ParseExact( "2015/01/15 17:37:00 -0500", "yyyy/MM/dd HH:mm:ss zzz", CultureInfo.InvariantCulture); Console.Write...
Superb asked 15/1, 2015 at 8:13

9

Solved

I have a String which I parse with DateTime.strptime. The Timezone of the Date in the String is CET but Ruby creates an UTC DateTime object which of course has an offset of 2hrs. Currently I'm wor...
Wideman asked 26/10, 2011 at 21:26

5

Solved

assume I have this string : How can I convert it to DateTimeOffset object that will have UTC time - means -00:00 as Time Zone - even if I run it on machine on a specific timezone? Assume String: ...
Point asked 6/11, 2012 at 15:28

4

Using SQL Server 2008.I have a table called User which has a column LastLogindata with datetimeoffset datatype The following query works on production server but not on replication server. select...
Potboiler asked 11/7, 2012 at 16:2

10

Solved

What is the difference between a DateTime and a DateTimeOffset and when should one be used? Currently, we have a standard way of dealing with .NET DateTimes in a TimeZone-aware way: Whenever we pr...
Baerl asked 2/12, 2010 at 2:39

5

Solved

I have a datetime in database which I read using SqlDataReader and then cast it to (DateTime). After the cast its Kind property is DateTimeKind.Unspecified. Then I have another string which I read...
Schizothymia asked 20/1, 2016 at 22:32

2

Solved

I am writing a stock program that (so far) gets the data from "Markit on Demand" through a request such as this: http://dev.markitondemand.com/Api/v2/Quote/xml?symbol=aapl This returns th...
Phonation asked 20/7, 2014 at 15:1

1

Solved

I was reading this MSDocs article about DateTime-related format support https://learn.microsoft.com/en-us/dotnet/standard/datetime/system-text-json-support#support-for-the-iso-8601-12019-format And...
Jollanta asked 6/6, 2021 at 8:10

4

Solved

I have the following code in an ASP.NET MVC3 Controller: public PartialViewResult GetCalendar(int? month, int? year) { var test = new DateTime((year.HasValue ? year.Value : 1), (month.HasValue ?...
Macintyre asked 10/12, 2012 at 10:36

3

Solved

Quartz.net offers a method to get the next time of the next trigger event: http://quartznet.sourceforge.net/apidoc/1.0/html/html/cc03bb79-c0c4-6d84-3d05-a17f59727c98.htm The docs claim that this T...
Excruciate asked 10/10, 2014 at 9:37

1

Solved

Are there any benefits to storing a UTC timestamp in a datetimeoffset field vs datetime2? It seems they're essentially the same. +------------------------------------+-----------------------------+...
Propellant asked 12/2, 2021 at 17:8

3

Solved

The postgresql Timestamp with Time Zone data type needs to be supplied an OffsetDateTime when being called using a High level language like Kotlin. I could not find a direct method that supports E...
Abrade asked 3/5, 2019 at 18:35

4

Solved

In my ASP.NET Core Web-API project, I'm getting a HTTP POST call to one of my API controllers. While evaluating the JSON payload and deserializing its contents, Json.NET stumbles upon a DateTime v...

5

i have a website developed in asp.net 4 and sql server 2008 R2. The problem is very complicated. I have a field in db with datatime offset UTC (ex. 2015-09-30 18:24:53.1498113 +02:00). Randomly (i ...
Louls asked 1/10, 2015 at 9:31

3

How to convert 2019-09-05T11:31:34.059Z this DateTime to offset 260. database:mssql, datatype:datetimeoffset(7). As one can identify current time-offset then how to convert the given date to this...
Bovine asked 5/9, 2019 at 12:35

9

Solved

I'm trying to take a date object that's coming out of my Drupal CMS, subtract one day and print out both dates. Here's what I have $date_raw = $messagenode->field_message_date[0]['value']; pri...
Shiv asked 4/10, 2011 at 16:45

© 2022 - 2024 — McMap. All rights reserved.