03-19-2018
17:59
- last edited on
08-19-2018
12:25
by
SantiR
03-19-2018
17:59
- last edited on
08-19-2018
12:25
by
SantiR
Hello,
I have been using the Flashring clockface for a while now and I love it. After updating to Fitbit OS 2.0, the date format seems to have switched from MM/DD/YYYY to DD/MM/YYYY. Has anyone else noticed this?
I tried some troubleshooting with the "Chronograph" clockface by Fitbit and it displays MM/DD. Is the date format based on a location setting in the user profile, or is it hard coded into the clockface?
Thanks!
Moderator Edit: Added Labels
Answered! Go to the Best Answer.
Best AnswerLet me please explain this issue. The Fitbit sdk does not support javascripts toLocaleDateString(). That's why I had to write my own solution for localisation, which was quite a lot of work and it is now used by some other clockfaces, since I published my code as opensource.
With the update to Fitbot OS2.0, there was a change in the API, I guess, and the localisation stopped working as expected. I tried to solve the issue with a workaround, which broke localisation again for some regions. Since I'm quite busy at work at the moment, It will take some time to fix it again. Please be patient! I'm not working for Fitbit, I'm not a professional JavaScript-developer (I need other languages for my job), I have a full-time job and a family! But I promise to investigate the issues once again.
Best AnswerHm...
This should only be the case if the users locale is set to "en-us". Are you sure that the new version of the clockface is installed and that your locale is not set to "en-us"?
Best Answer
Best Answer
Best AnswerDefinitely installed and updated. All settings look correct. Just to make sure I’m not missing anything obvious, where should I be checking for location settings?
Best AnswerDon’t worry about it actually mate, more important things in life that sorting stuff out for strangers on the internet! Cheers anyway!
Best Answer@Reptilejch: I'm a teacher for math and computer science and besides I'm developing software for the school's administration.
@AJS149: I don't remember where you can set the locale, sorry
Best Answer
Best AnswerYou have to use the PowerAPI: https://dev.fitbit.com/build/reference/device-api/power/
You can take a look into the code of my ClearBeam-watchface if you like: https://gitlab.com/private-software/fitbit-clearbeam-watchface.git
Best AnswerHi Sam,
sorry to bring this one back from the dead - I had a look into your code, and I think the issue is that your localization string isn't choosing en-"other" so for example in Australia, we are en_au rather than en_us.
I'm not entirely sure how your subroutine works, as I'm an infrastructure guy, not coder, but pretty confident that this is where the date sequence issue is arising from...
I tried modifying a pull from GitHub, but I was missing something as I couldn't get it to change.
I BELIEVE Line 132 should look something like this:
"if ( prefix == "en" || prefix == "au" || prefix == "gb" || prefix == "de"" ) {
Melbourne, Australia 🙂
Fitbit History: Flex, Charge HR, Charge 2, Ionic
Best AnswerHey Andrew,
sorry, but this
"if ( prefix == "en" || prefix == "au" || prefix == "gb" || prefix == "de"" ) {
will not work or fix the problem. I will try to fix the issue. Please be patient.
All the best,
Sam
Best AnswerI'm having the same issue, it's presenting format "MM/DD/YYYY" and in my location (Portugal) I'm expecting "DD/MM/YYYY". Is it possible to solve this by letting the user choose the format wanted in the Settings area of the clock face? That way this issue is solved forever, no matter the "location".
Thanks a lot for the amazing clock face btw 😄
Best AnswerYes and no @carlostorrao, their is no setting on Fitbit, but several third party clock faces do have this ootion. With 500 or do faces im not sure which ones, a search of this board should help since this subject comes up reqularly, and specific faces have been mentioned.
This will come with the next update. It is already implemented in my clockface Flashring2. Take a look, it might be an alternative if you don't want to wait for the update.