I’m having a small issue with a user who has a simple field in a Word template. The field looks like:
{ MERGEFIELD Appointment_Time \@ "MMM d h:mm am/pm" }
The value of the Appointment_Time field is stored in GMT. The user would like the value of the field to appear as his local time zone, but it shows as the value of the timezone in which our server is located (which happens to be 3 timezones ahead of the location of the user).
This seems like a similar problem to formatting numerical values according to Locale settings, but since the Locale setting (“en-US”) doesn’t contain timezone, Words naturally uses the timezone of the server.
Do you have a suggestion on how I can get Words to use the current user’s timezone (which I do have available in my data) in evaluating date/time fields?
Many thanks, Vitaly. I really appreciate you looking for this for me.
In my case, I was hoping for a solution within Aspose.Words because the data set I’m working with is different for each of my users, so I don’t have the luxury of knowing which fields are date-time fields and which are not. So I won’t be able to programmatically convert values to the correct timezone using typical tools.
However, perhaps I can use a merge field event handler to determine if the user has applied a Date/Time picture switch to the field, and if so, attempt to convert it to their timezone, and then use Words to insert the value.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.