...
I'm using this class in the services, to return a DateTime which includes the timezone offset.
Warning |
---|
Small disclaimer with the above helper, I am assuming the offset is + from UTC. This may not be the case depending on your location. When I get some time I'll improve this code. |
Date format in UTC
Code Block | ||||
---|---|---|---|---|
| ||||
public static string ToISODate(DateTime dateTime) { return dateTime.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.00Z"); } |
...