We have moved to a new Sailfish OS Forum. Please start new discussions there.
9

Clock: seconds (time display)

asked 2015-02-19 16:27:43 +0200

Robomike gravatar image

Just made ntp work, but noticed that I can't see seconds. Is there any way far from Android to display the seconds?

edit retag flag offensive close delete

Comments

3

I would like the option to have seconds displayed on the clock on lock screen and home screen, not just when opening the clock app. Is that possiblefor a user to fix, or woult it have to be included in an OS update?

TomC ( 2015-11-19 10:03:58 +0200 )edit

Sailfish X clock app doesn't seem to have seconds -- I also would like to see seconds so that I can separate e.g. 20:29:10 and 20:29:50 from each other. In 40 seconds (for this example) one can do guite a lot...

too ( 2018-03-27 19:49:56 +0200 )edit

5 Answers

Sort by » oldest newest most voted
5

answered 2015-02-19 17:27:46 +0200

Yo gravatar image

updated 2015-02-19 17:36:13 +0200

I just investigated another idea, that needs programing skills:

In Terminal app (or via SSH -> more comfortable) have a look at the files

  • /usr/share/jolla-clock/pages/main/Clock.qml
  • /usr/share/jolla-clock/pages/main/ClockItem.qml

In the first file the updateFrequency has to be changed. Without knowing what to put there and if it's even possible you could try 'WallClock.Second'.

In the second file the 1st Text {…} (right after layoutDirection) seems to create the text for the clock. For 24h format the line Format.formatDate(time, Format.TimeValueTwentyFourHours) has to be altered, for 12h format it's the code below. I guess it's a matter of appending the seconds to the string result before returning it. Seconds could be got with time.getSeconds().

Always backup the files before modifying them!

I did not try it, but it looks promising!

Edit: I tried a simple approach: Alter the first file as suggested and then in the second file replace the corresponding line with return Format.formatDate(time, Format.TimeValueTwentyFourHours) + ":" + time.getSeconds(). It adds Seconds to the clock (if in 24h mode) but it also adds seconds to alarms. :D I guess there has to be done more but obviously it's possible.

edit flag offensive delete publish link more

Comments

Hey, that's nice. Good idea to do it in the clock app, my idea was to have it on the lock screen, but this is better. I made the font half size as original 124/720 * screen.width and added the leading zero in ClockItem.qml: if (timeFormatConfig.value === "24") { var sekunden = time.getSeconds() if (sekunden < 10) { sekunden = "0" + sekunden } return Format.formatDate(time, Format.TimeValueTwentyFourHours) + ":" + sekunden }

I like it! Thank you!

Robomike ( 2015-02-19 21:31:58 +0200 )edit

I tried editing Clock.qml and ClockItem.qml. However, I found ClockItem.qml in the folder ...jolla-clock/common (Saimaa/2.0.0.10). It's a nice possibility, but I wouldn't want to have seconds displayed on alarms. This solution doesn't either update seconds on the clock app cover, just once per minute. Any suggestions how to achieve these things?

TomC ( 2015-11-19 10:00:29 +0200 )edit
5

answered 2016-09-16 01:17:09 +0200

Spam Hunter gravatar image

updated 2016-09-16 01:32:08 +0200

Seconds added to lockscreen clock (for Jolla1)

View: https://openrepos.net/content/markkyboy/patch-seconds-lockscreen-clock

Direct Download: https://openrepos.net/sites/default/files/packages/1290/sailfishos-patch-seconds-lockscreen-clock-0.1-1.noarch.rpm

image description

image description

edit flag offensive delete publish link more

Comments

Good one! Thanks for this. BTW, how do you change the operator name? The patch in Openrepos is marked as obsolete and does not work anymore.

Jordi ( 2016-09-16 08:34:38 +0200 )edit

Thanks @Jordi - Sorry chap, I have no idea about changing the operator name, probably best to contact the original author of the application and see if they can help.

Spam Hunter ( 2016-09-16 11:31:39 +0200 )edit

Ah, sorry, I didn't know that "giffgaff" was an operator name!

Jordi ( 2016-09-16 14:36:38 +0200 )edit

@Jordi - Gotcha, I see your initial confusion now. Yep, I left Orange years ago and joined Giffgaff, one of the best financial moves I have made regarding network providers.

Spam Hunter ( 2016-09-16 14:46:40 +0200 )edit
1

Thanks, Markkyboy!

Robomike ( 2016-09-17 00:19:16 +0200 )edit
4

answered 2015-02-19 16:51:35 +0200

Yo gravatar image

updated 2015-02-19 16:59:07 +0200

  • Enable developer mode,
  • open Terminal app,
  • write date and hit Enter.

:D

Edit: I'd also like to be able to see seconds in clock app.

edit flag offensive delete publish link more
3

answered 2015-02-19 17:05:26 +0200

drcouzelis gravatar image

There is a native Jolla application called "Swiss Clock" on openrepos.net / Warehouse. It shows an large analog clock (including seconds) both fullscreen and on the cover. I usually have it running to allow me to quickly glance at the time. :)

edit flag offensive delete publish link more

Comments

Nice app, thanks for hint!

Robomike ( 2015-02-19 21:24:17 +0200 )edit
0

answered 2016-09-16 14:11:14 +0200

objectifnul gravatar image

updated 2016-09-16 14:12:10 +0200

Other solution: wall clock patch

(Does not conflict with lockscreen analog clock)

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2015-02-19 16:27:43 +0200

Seen: 2,042 times

Last updated: Sep 16 '16