##Drop the timezones
Drop the timezones
As a learning exercise (dealing with timezones) I think you have picked the wrong application.
##Date time as string
Date time as string
I suggest that you use a date time string with no time zone info rather than the UTC Unix tick. Standard format ISO 8601 using moment.js client side (browser ISO 8601 compliance is all over the place) to parse for the date picker, and format without timezone (offset zero "Z") for transport to the back-end
The back-end (.net) supports ISO 8601. Parse the booking date time string to store, then send as a date time string using round-trip format specifier eg bookingDate.ToString("o");
##Why
Why
Handing multiple timezones on the client will be problematic at best. You will need a robust library for the timezones. moment.js is not up to the job, its successor Luxon
will provide better timezone management but that comes with a hefty data overhead.
All you want is a date time picker for the client to make a booking, for that I do not think the complication of juggling timezones is worth the effort when a local time string (location of hotel) will do the job.
##Drop the timezones
As a learning exercise (dealing with timezones) I think you have picked the wrong application.
##Date time as string
I suggest that you use a date time string with no time zone info rather than the UTC Unix tick. Standard format ISO 8601 using moment.js client side (browser ISO 8601 compliance is all over the place) to parse for the date picker, and format without timezone (offset zero "Z") for transport to the back-end
The back-end (.net) supports ISO 8601. Parse the booking date time string to store, then send as a date time string using round-trip format specifier eg bookingDate.ToString("o");
##Why
Handing multiple timezones on the client will be problematic at best. You will need a robust library for the timezones. moment.js is not up to the job, its successor Luxon
will provide better timezone management but that comes with a hefty data overhead.
All you want is a date time picker for the client to make a booking, for that I do not think the complication of juggling timezones is worth the effort when a local time string (location of hotel) will do the job.
Drop the timezones
As a learning exercise (dealing with timezones) I think you have picked the wrong application.
Date time as string
I suggest that you use a date time string with no time zone info rather than the UTC Unix tick. Standard format ISO 8601 using moment.js client side (browser ISO 8601 compliance is all over the place) to parse for the date picker, and format without timezone (offset zero "Z") for transport to the back-end
The back-end (.net) supports ISO 8601. Parse the booking date time string to store, then send as a date time string using round-trip format specifier eg bookingDate.ToString("o");
Why
Handing multiple timezones on the client will be problematic at best. You will need a robust library for the timezones. moment.js is not up to the job, its successor Luxon
will provide better timezone management but that comes with a hefty data overhead.
All you want is a date time picker for the client to make a booking, for that I do not think the complication of juggling timezones is worth the effort when a local time string (location of hotel) will do the job.
##Drop the timezones
As a learning exercise (dealing with timezones) I think you have picked the wrong application.
##Date time as string
I suggest that you use a date time string with no time zone info rather than the UTC Unix tick. Standard format ISO 8601 using moment.js client side (browser ISO 8601 compliance is all over the place) to parse, for the date picker, and format without timezone (offset zero "Z"), for transport to the back-end
The back-end (.net) supports ISO 8601. Parse the booking date time string to store, then send as a date time string using round-trip format specifier eg bookingDate.ToString("o");
##Why
Handing multiple timezones on the client will be problematic at best. You will need a robust library for the timezones. moment.js is not up to the job, its successor Luxon
will provide better timezone management but that comes with a hefty data overhead.
All you want is a date time picker for the client to make a booking, for that I do not think the complication of juggling timezones is worth the effort when a local time string (location of hotel) will do the job.
##Drop the timezones
As a learning exercise (dealing with timezones) I think you have picked the wrong application.
##Date time as string
I suggest that you use a date time string with no time zone info rather than the UTC Unix tick. Standard format ISO 8601 using moment.js client side (browser ISO 8601 compliance is all over the place) to parse, for the date picker, and format without timezone (offset zero "Z"), for transport to the back-end
The back-end (.net) supports ISO 8601. Parse the booking date time string to store, then send as a date time string using round-trip format specifier eg bookingDate.ToString("o");
##Why
Handing multiple timezones on the client will be problematic at best. You will need a robust library for the timezones. moment.js is not up to the job, its successor Luxon
will provide better timezone management but that comes with a hefty data overhead.
All you want is a date time picker for the client to make a booking, for that I do not think the complication of juggling timezones is worth the effort when a local time string (location of hotel) will do the job.
##Drop the timezones
As a learning exercise (dealing with timezones) I think you have picked the wrong application.
##Date time as string
I suggest that you use a date time string with no time zone info rather than the UTC Unix tick. Standard format ISO 8601 using moment.js client side (browser ISO 8601 compliance is all over the place) to parse for the date picker, and format without timezone (offset zero "Z") for transport to the back-end
The back-end (.net) supports ISO 8601. Parse the booking date time string to store, then send as a date time string using round-trip format specifier eg bookingDate.ToString("o");
##Why
Handing multiple timezones on the client will be problematic at best. You will need a robust library for the timezones. moment.js is not up to the job, its successor Luxon
will provide better timezone management but that comes with a hefty data overhead.
All you want is a date time picker for the client to make a booking, for that I do not think the complication of juggling timezones is worth the effort when a local time string (location of hotel) will do the job.
##Drop the timezones
As a learning exercise (dealing with timezones) I think you have picked the wrong application.
##Date time as string
I suggest that you use a date time string with no time zone info rather than the UTC Unix tick. Standard format ISO 8601 using moment.js client side (browser ISO 8601 compliance is all over the place) to parse, for the date picker, and format without timezone (offset zero "Z"), for transport to the back-end
The back-end (.net) supports ISO 8601. Parse the booking date time string to store, then send as a date time string using round-trip format specifier eg bookingDate.ToString("o");
##Why
Handing multiple timezones on the client will be problematic at best. You will need a robust library for the timezones. moment.js is not up to the job, its successor Luxon
will provide better timezone management but that comes with a hefty data overhead.
All you want is a date time picker for the client to make a booking, for that I do not think the complication of juggling timezones is worth the effort when a local time string (location of hotel) will do the job.