Why does Excel's NOW() function return different times depending when embeded on a website?

ExcelforHealth

New Member
Joined
Sep 25, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
I am using the current time to run 'live' calculations in excel using =NOW(). The excel file is saved in my OneDrive. When I embed my excel worksheet on a web page sometimes it displays the local (system) time and sometimes it displays UTC time. It appears to depend on the device or brouser being used. If i access the website from my windows computer the time is displayed as system time. If i view it from my iphone or my mac computer it shows UTC time. Is there a way to force it to use UTC time (preferred)? or force it to use the local system time? either one will work but needs to be consistent for my calculations to be correct? As this is embedded there can't be links to external sites or macros. Also I'll mention i don't care which time zone the user is in as long as the time is handled the same by all. I've created a blog post to show this issue.

Awareness

I'm using the iframe code that excel generates to embed it. Thanks in advance for your help.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
If I am not mistaken NOW() os based on the clock on MY computer and thus if I travel, it will give different results based on where i am.
With that I do not believe that you can lock it based on UTC.

Could you potentially have a "What is your time zone?" field and then use a lookup function and add or subtract the hours?

I am in the Atlantic time zone (Eastern US plus 1 or UTC - 4) so
=NOW()+4/24 to get my UTC time
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top