@Simon_Hill no problem, I understand what you meant. What we are looking for (in my case) is a reliable time using an automatic way without firing a manual action in the middle. Also, if we can do it using Glide tools 100% we would make a home run but sometimes we wish and sometimes we fail
@Jeff_Hager you’re absolutely right… te odio!
You remind me my mom, she always paid attention to details and those rare scenarios that make an exception. I had noticed that problem with timezones with -/+ 30 or 45 min thinking in my country (currently Venezuela quit using -4:30 offset and now we use 4:00).
Having said this, my workaround is useful for 93% of cases
Just to clarify, my solution is 100% Glide. 4 columns in a glide table to determine GMT, which could probably be condensed into 2 columns, to determine GMT or any other time zone (GMT+2 or GMT-2) if needed.
@Jeff_Hager the medium format of date/time breaks the logic because it is localized and might include some words that are not “understood” by your logic (in my case it’s “tháng” - which means “month”).
I think he means 93% in that it covers all timezones except those rare ones that fall on the 1/2 hour or 3/4 hour, which could throw off the result by an hour for part of an hour. But only in those odd timezones.
@ThinhDinh Ok, I changed the Local Date Time to the Short Format for the calculation and added a new math column so I could reformat it to the Medium Format for display purposes.
Ha! That was great! That is date and time in a nutshell. Seems simple, but gets more complicated the more you think about it. Thankfully I don’t have to deal with anything nearly that complicated at work. We have servers in different time zones, but everything is synced to one time zone.
I wonder what kind of business that guy works at. Sure covers a lot of different users.
@Jeff_Hager - I implemented this method in one of my apps yesterday, and it was working perfectly. But just now I checked and I’m suddenly getting a GMT offset of -712 hours (it should be +8)
Must be something with crossing over to a different month??? 712 hours is 29.6 days and a lot of the math uses the day number. I’ll have to think about this.
Your formula looks different from what I have in the first post…but nothing is jumping out to me that would cause such a large offset.
If you break it down, what do you get for a value for each part?
What is your hour(gmt), day(gmt), hour(ldt), day(ldt) so I can hand calc it with your formula?
Hour(gmt) and Day(gmt) are both wrong. They should be 30 and 13 respectively. So I guess that suggests that the Glide “trick” isn’t working the way we expect it to?