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.

1 Like

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:

2 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:

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