Skip to content

Commit ae6e82d

Browse files
author
dimodi
committed
Update README.md
1 parent 5412527 commit ae6e82d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed
+10-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
# Using UTC time on both client and server sides.
2-
This project shows how to keep the UTC date on both server and client sides and avoid the offset that is being added automatically.
2+
3+
This project shows how to keep a DateTime property in UTC format on both server and client sides when using a Grid with Ajax Binding and editing, and avoid the offset that is being added automatically.
4+
5+
Every time a date is being retrieved from the database or received from the client, the `DateTime Kind` property is left unspecified. The .NET framework implicitly converts such dates to local format.
6+
7+
Similar thing happens on the client side. Browsers convert all dates according to local time when the Date.
8+
9+
For example when you create a JavaScript date like this `new Date(1353397262112)` different browsers which machines use different TimeZones will show different string representations of that Date.
10+
11+
So in order to keep time in UTC, explicit transformation should be applied to the dates on both client and server sides.

0 commit comments

Comments
 (0)