Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Terminology for specific date times
Message
 
To
25/06/2015 11:02:30
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01621456
Message ID:
01621470
Views:
57
The first one is ISO 8601. The second one is not valid - I believe if you want to be a valid format it needs a Z at the to indicate the timezone is UTC.
DateTime.UtcNow.ToString("o").Dump();
DateTime.Now.ToString("o").Dump();	
string.Concat(DateTime.UtcNow.ToString("s"), "Z").Dump();
which gives you:
2015-06-26T05:32:20.5644525Z
2015-06-25T22:32:20.5644525-07:00
2015-06-26T05:32:20Z


The first and third are the same format just the first has more precision and is officially correct.

Here's a good overview of timeformats that .NET outputs and presumably can parse as well.
https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx

+++ Rick ---


Services for the sake of services is dumb and all it does is add overhead. Use the right tool for the job.

>What would be the terminology to use to recognize this specific date time format:
>
>2015-06-25T08:06:31-04:00
>
>...and this one:
>
>2015-06-25T08:11:41
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform