- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2025 09:13 AM
I have a need to have a time or date/time variable to allow either timezone selection or have a static timezone. So essentially if I am placing a time for a facility that is located in Eastern timezone but I am viewing in Pacific Timezone I don't want the time to be converted I need it to stay as the time entered. Can anyone suggest options?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2025 09:01 AM
I opted to do something like this I wasn't aware of the UTC field type so this was the best solution because of the need for a time that doesn't change. Obviously this is not accurate because the local time is being treated as UTC time so conversions aren't accurate or possible. This was a quick fix since this was the groups oversight when this project was being built and it just needed a quick solution. If they want to be able to do proper reporting or tracking down the line (which I disclosed now) they will need to request a different process. And now they learned the lesson of not being fully aware of what the project requires going forward.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2025 12:24 PM
All times are stored in UTC in the system. The data will always be stored as UTC in the database, but could appear differently if a user has set preferences. You can set the default timezone with the system property glide.sys.default.tz (I believe it's Pacific by default). Here's a link to the docs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2025 12:55 PM
Yah this I am aware but the desire is that people all over the country will be working on tickets and the time is supposed to be relevant to the timezone of the facility it's for. So if there is a delivery time for Texas at 2pm and I am in New York I need the time to still show 2pm because it isn't relevant to the user working the ticket it's relative to the location it's for. So no matter who is viewing the ticket it will always show 2pm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2025 01:35 PM - edited ‎01-06-2025 01:35 PM
Just for the sake of poking a potential hole in your logic there -- wouldn't you want the time to adjust to the user's timezone so they know they have a deadline to meet? For example, if you were in New York and you saw the delivery time was 14:00 (2pm), you would assume it's 2:00pm and not 13:00 (1pm Texas time).
Also, when the delivery is being scheduled, wouldn't the timezone matter?
You may need to create a custom field to display it consistently in UTC... it'd be in a before BR (see this post).
var date1 = current.getValue('date_time_field');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2025 12:15 PM
No because this is used by the coordination team to handle scheduling and they need to know what the respective time is for the location they are supporting. Having a relative time hurts them in their process because they are using a different system to handle the scheduling and it's relative to the location. So the need is to be able to display the time in the timezone of the facility not for them.... This is just the ask they have I am not here to modify their SOP's