If the user has a different time zone, how can I find out the time zone for a specific date field?

MayurGavhane
Tera Contributor

Hello All,

I am using UI Formatter(Schedule Date Range Selector) for Date range selection as I have attached picture above.

I have set the time to between 8:00 and 9:00AM,Although each user's timezone is different, it displays the same for them all.

How can I get what field is using for the time? 

 

MayurGavhane_0-1695382662657.png

 

Thanks.

2 ACCEPTED SOLUTIONS

-O-
Kilo Patron
Kilo Patron

The parent Schedule is most likely configured for floating time zone.

Change it to a fixed time zone.

View solution in original post

Can you share the script?

Setting field schedule to the parent schedule's unique value (sys_id) will attach the entry to the parent schedule.

Once that is done the schedule dot-walk will also correctly show the parent schedule's TZ.

As for generating the entries through script, as long is there is an algorithm to know the periods, should be possible, but before being able to tell for sure, that logic must be shared.

I mean fiscal periods are generated by script.

B.t.w, if you have fiscal periods in your instance you could have a look at that code, it should get you started.

View solution in original post

9 REPLIES 9

Well, I keep telling you to go the the parent Schedule record and edit that, but you insist on editing the Schedule Entry record.

So I guess try editing the parent Schedule record.

MayurGavhane
Tera Contributor

Hi @-O-  This worked perfectly, but I have one more requirement, like creating schedule entries for whole year at a time, which I am trying to create in the child record through script, but the time zone is not populating, and child record is not attaching to the parent record.

Could you please suggest how we can create schedule entries using a script?

Can you share the script?

Setting field schedule to the parent schedule's unique value (sys_id) will attach the entry to the parent schedule.

Once that is done the schedule dot-walk will also correctly show the parent schedule's TZ.

As for generating the entries through script, as long is there is an algorithm to know the periods, should be possible, but before being able to tell for sure, that logic must be shared.

I mean fiscal periods are generated by script.

B.t.w, if you have fiscal periods in your instance you could have a look at that code, it should get you started.

MayurGavhane
Tera Contributor

@-O- I really appreciate your help; this worked.

You're most welcome 🙂