Need time zone help

I am new and don’t know expressions.
please help me with time zone for osaka japan
i want to use 12 hrs time digital and also rotation clock 12 hrs time
thank you.

2 Likes

Analog

Hour hand

Place the following code in the rotation field ( located in the advanced tab )

(((#DUh#+#DUm#/60+#DUs#/3600)+9)*30)

Where the 9 in the above expression is the timezone offset for Osaka.

Minute hand

Place the following code in the rotation field

((#DUm#+#DUs#/60+0)*6)

Where the 0 in the above expression is the additional minutes of timezone offset. Zero in this case because the time zone offset for Osaka is a whole number of hours.

Digital

Two options for the digital display: 0…11 or 1…12 hours

0…11 hours

Create a text object to display hours and place the following code in the Text field:

((#DUk#+9)%12)

1…12 hours

Create a text object to display hours and place the following code in the Text field:

((#DUh#-1+9)%12+1)

minutes

For Osaka ( UTC+9 ) you can use the standard UTC minute tags in the the minutes text field, for example:

#DUm#

Note: If the time zone offset was not a whole number of hours ( say, UTC+h:mm ), then the code for the minutes Text would be

((#DUm#+mm)%60), where mm is 0, 15, 30 or 45 depending on time zone

:slight_smile:

5 Likes

Thank you so much!!! this was exactly what i was trying to figure out the epressions for
is there a way to show what day it is when its its 12 am next day in oska to say what day it is

1 Like

You are most welcome!

Working out what day it is is more complicated - I will need to think about it…

2 Likes

Ok, I think I have this right …

Assuming weekdays are numbered from 0…6, with 0 == Sunday

The day of the week number in timezone UTC+0 is given by

(floor((#DNOW#/86400000)+(0/24)+4)%7)

So the day number in Osaka ( UTC+9) is

(floor((#DNOW#/86400000)+(9/24)+4)%7)

There is no simple equation that will convert this day number into a text field for the day. What I would do is have 7 text layers with Opacity set to:

Sunday:
Text: Sun
Opacity: $(floor((#DNOW#/86400000)+(9/24)+4)%7)==0?100:0$

Monday:
Text: Mon
Opacity: $(floor((#DNOW#/86400000)+(9/24)+4)%7)==1?100:0$

etc., through to

Saturday:
Text: Sat
Opacity: $(floor((#DNOW#/86400000)+(9/24)+4)%7)==6?100:0$


I think that will work.

:slight_smile:

1 Like

First off I want to say thank you for all of your help! I great appreciate it! I haven’t had a chance to try it out yet but will let you know how it works out.
is there a expression to show the weather and to show am pm? if not it’s ok! i appreciate all of your help

1 Like

You are most welcome :slight_smile:

Weather: what exactly did you want to display? There are the built in “widgets” and tags that will display various aspects of the weather in your local area.

AM/PM: do want this for your own timezone or for somewhere else?

the days worked 100%

AM/PM and weather for osaka japan pease
if this is too much to figure out its fine if you can’t

btw: whee can i learn expressions besides what facer has because its confusing to me

1 Like

Sorry, just to be clear, are you in Osaka or are you trying to set up a dual time zone face with local time and Osaka time? My assumption was that you were trying to set up dual time watch.

The best way to make a start on creating faces in Facer is to work the documentation and tutorials. Have you looked at these? You can find them at:

https://help.facer.io/hc/en-us/categories/360000027234-Facer-Creator

looking at making dual zone:grinning:

1 Like

Ok.

I don’t think it is possible to display the weather in another time zone.

AM/PM for Osaka is doable …

In the text field you could try the following expression:

$(((#DUH#+#DUm#/60+#DUs#/3600)+9)%24)<=12?AM:PM$
1 Like

perfect
everything has worked. thank you again.
you can close this now

1 Like

You are most welcome.

:slight_smile:

1 Like

Hi, Thank you for these codes, but they have 1 teeny flaw that I came across.
I have been working on a watch face specifically with a dual time face that has Australia (where I am) and Newfoundland Canada (where my friends are). I did similar codes to yours and have found this problem:
Although the minutes display correctly, they do NOT alter the hours when the code alters the minutes. You will see that when the altered minutes change from 29 to 30, the hour will UTC change thus showing an incorrect time. I cannot figure out how to solve this. I hope the 2 pics will explain better…c1 c2
The first pic shows a correct time in both Aus (top) and Newfoundland (bottom). There is a 13.5Hr difference between the 2 countries. The second pic shows that 8 minutes later, the hour has clicked over and now there is only 12.5 Hr difference. Do you see what I mean?

These expressions should work - use the set that applies to the time zone you want:

Time zone: UTC-3.5:

minutes:
(floor((((#DUm#+#DUs#/60)-3.5*60)+720)%60))

hours:
(floor((((#DUh#+#DUm#/60+#DUs#/3600)-3.5)+12)%12))

Time zone: UTC-4:

minutes:
(floor((((#DUm#+#DUs#/60)-4*60)+720)%60))

hours:
(floor((((#DUh#+#DUm#/60+#DUs#/3600)-4)+12)%12))

Time zone: UTC-4.5:

minutes:
(floor((((#DUm#+#DUs#/60)-4.5*60)+720)%60))

hours:
(floor((((#DUh#+#DUm#/60+#DUs#/3600)-4.5)+12)%12))

I don’t know which one is the right time zone for Newfoundland ( noting that I believe Newfoundland may have daylight savings and you would need to adjust the value when it changes ).

Hi Mike,
Yep these worked and solved the main problem I had - thank you so much for your help!
My last issue is the display of any minutes under 10 do not have the leading zero. I believe that even though I use the tag DUmZ (that should display the leading zero) that once we alter the number through an expression/equation that the leading zero gets omitted. Would you agree?Capture

Hi @jus10

Just a thought; is the box where the text shows big enough to show the number? Try to make the font size for that box smaller and see if it shows