timestamp - How to calculate based on user's timezone?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

timestamp - How to calculate based on user's timezone?

Post by ddumas »

I have a scheduling application, that uses MeetingTimeStamp, which is a timestamp. That MeetingTimeStamp can get sent out in email to multiple users attending the event. Those users can cross timezones.

Does AwareIM have any concept of timezone?

I realize that I can create a home grown BO, and the user can pick a timezone, and then I can the timestamp, and sent out the calced value in the email.

Dave
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: timestamp - How to calculate based on user's timezone?

Post by aware_support »

Aware IM should support timezones automatically. Every System User object has a special attribute TimeZone, which identifies timezone of this user. All timestamps are automatically converted into this timezone when a record with timestamps is displayed. Not sure about emails, though (can't remember) - you just need to try.
Aware IM Support Team
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: timestamp - How to calculate based on user's timezone?

Post by ddumas »

I have queried all the user related SQL tables and Timezone is null. Can you elaborate on how this gets populated, and how it relates to a timestamp column?

Use case that I need to solve:

I schedule an event in an Event BO, at 12/19/2019 at 19:30 (this is the timestamp column of EventTimestamp), and send out an email to 3 members, that are in 3 different timezones (although this is not populated as I have stated above). I would like the email to convert the timestamp of 19:30 to the appropriate timezone if the member. Like outlook does.

Any ideas?

Dave
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: timestamp - How to calculate based on user's timezone?

Post by Jaymer »

ddumas wrote: #1 -- I schedule an event in an Event BO, at 12/19/2019 at 19:30 (this is the timestamp column of EventTimestamp), and send out an email to 3 members, that are in 3 different timezones (although this is not populated as I have stated above).

#2 -- I would like the email to convert the timestamp of 19:30 to the appropriate timezone if the member. Like outlook does.
1. the 3rd field in the SQL table, the timestamp, matters not. the "event time" is StartTime. Thats the field the scheduler uses.

2. When I used to submit Google Calendar entries via REST, I believe they had to be converted to UTC time (12/19/2010T00:00:00 format) ... so it was starting at UTC and then it any client converts it to local timezone when viewed.

When you're logged in as a user, go to User Settings / "Change user setting" / whatever its called, and set the Timestamp combo box. If its not on the Form, go add it.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: timestamp - How to calculate based on user's timezone?

Post by ddumas »

I should have explained better. I am not using an awareim scheduler, but maybe I should?

I have a home grown BO called Event , which has a EventTimeStamp attribute of type timestamp. When I send that out in an email to a member in another timezone, I need to reflect that members timezone for EventTimeStamp .
Dave
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: timestamp - How to calculate based on user's timezone?

Post by ddumas »

I added the timezone built-in attribute to the main form of the Member, but when the Event email was sent that Member, the Event.EventTimeStamp attribute was not changed in the email to reflect the timezone setting for that (or other) Members that the email was sent to. Forgive my ignorance in how to achieve this timezone stuff.

I am sure there may be a better way to do this.
Dave
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: timestamp - How to calculate based on user's timezone?

Post by aware_support »

We have checked and the system should convert the time in emails automatically (unless there is a bug, of course). What exactly do you have in your email?
Aware IM Support Team
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: timestamp - How to calculate based on user's timezone?

Post by ddumas »

I am not explaining correctly.

When I send Event emails to other Members, the Event.EventTimeStamp attribute does not adjust in the email to reflect the timezone setting for that (or other) Members that the email was sent to.

I embed Event.EventTimeStamp into the body of the email sent to each recipient. each recipoient is also a member, so I do know their timezones.

So here is the use case:

An event is scheduled for 12/19/2019 at 19:30, by an organizer who is a Member. Let's say that the Member who created the event is in US Eastern time. For that Member he/she is thinking 7:30p EST

The 12/19/2019 at 19:30 is stored in Event.EventTimeStamp
When I send the email, I embed Event.EventTimeStamp into the body of the email to each recipient who is also a member.

Let's say that one user to whom the email is boing sent is in US Mountain time. So, to that user, the embedded event timestamp should say 12/19/2019 at 17:30 (Eastern time - 2 hours) = 5:30p Mountain Time

Does that make sense? Is there a better way to do this - Ex with some awareim built-in event scheduler component?

I cannot say in the email: "The organizer of this event is using US Eastern time. Please adjust this time to your time zone"

If you tell me that there is no built-in functionality to achieve this, and that I must do the math to convert from the Event Organizer's timezone to the timezone of each recipient, then I can look into that.

Dave
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: timestamp - How to calculate based on user's timezone?

Post by aware_support »

I see. It's a deficiency in the system. We will add a function in the next build that allows explicit conversion of the timestamp into a specified timezone, so that you can add something like this in your email body:

<<TO_TIMEZONE(Event.EventTimestamp, Member.TimeZone)>>
Aware IM Support Team
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: timestamp - How to calculate based on user's timezone?

Post by ddumas »

That would be awesome.
Thanks,
Dave
bondicoffee
Posts: 130
Joined: Tue Dec 03, 2013 10:19 pm

Re: timestamp - How to calculate based on user's timezone?

Post by bondicoffee »

Hi,

Is TO_TIMEZONE() function implemented in awareIM?


Thanks!
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: timestamp - How to calculate based on user's timezone?

Post by aware_support »

Yes
Aware IM Support Team
bondicoffee
Posts: 130
Joined: Tue Dec 03, 2013 10:19 pm

Re: timestamp - How to calculate based on user's timezone?

Post by bondicoffee »

Thank you for confirming. I could not find this function in documentation.

Is the time format field case insensitive ? For example, forNZST,GMT,Zulu could you describe what should be the format ? Does it also consider day light saving changes ?

Thanks.
Post Reply