how would it be in case that I have many users entering from different timezones? and How can I change the time format from YYYYMMDD HH:MM:SS to MMDDYYYY HH:MM AM/PM ?
You should store your dates in UTC and convert them to the timezone of each user for display only. The way you manage this can be by automatically determining the timezone from the browser or the device or by a user configuration in the backoffice. Either way, you need to program for this.
Regarding the format it is independent of the timezone conversion since the timezone returns a DateTime. You can use the FormatDateTime function for that.
Function (GetCurrentTimeZone) does get the system time zone from the server. Any idea how to get the client time zone? Will it be the client time zone defined on the PC or derived from another parameter like the IP?
Khalil Dahham wrote:
The client time will be derived based on the Client Browser settings for the Locale of the client,