Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: time only utc ?

  1. #11
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    2,569
    Are you connected to the internet?

    Are you using your own ntp server?

    Have you installed a RTC?

  2. #12
    Senior Member
    Join Date
    Jun 2017
    Posts
    785
    Quote Originally Posted by bpa View Post
    By cli - do you meant LMS CLI on port 9090 ?
    If so then I think it returns Linux EPOCH time which is time is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT)
    There is no TZ with epoch time.
    Your local TZ setting will change how epoch time is display as local time.
    I can confirm that the date command, when entered via telnet in the LMS CLI produces this output for me, after "unquoting":

    Code:
    date_epoch:1648582503 date:0000-00-00T00:00:00+00:00
    Usually running latest beta LMS nightly on Raspberry Pi OS with virtual players (Squeezelite and Airplay bridge). Occasionally using SB Radio, Boom or Classic.

  3. #13
    Senior Member
    Join Date
    Jan 2022
    Location
    Switzerland
    Posts
    146
    Quote Originally Posted by bpa View Post
    By cli - do you meant LMS CLI on port 9090 ?
    Yes exactly !

  4. #14
    Senior Member
    Join Date
    Jan 2022
    Location
    Switzerland
    Posts
    146
    Quote Originally Posted by RobbH View Post
    I can confirm that the date command, when entered via telnet in the LMS CLI produces this output for me, after "unquoting":

    Code:
    date_epoch:1648582503 date:0000-00-00T00:00:00+00:00
    ok thanks. Only epoch time is available on the LMS CLI ?

  5. #15
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    21,824
    Quote Originally Posted by PaulH View Post
    ok thanks. Only epoch time is available on the LMS CLI ?
    AFAICT only epoch time is available.

    The usual approach would be to convert epoch time to local time in the application.
    e.g. for bash -
    Code:
    > date -d @1648580310
    Tue 29 Mar 19:58:30 BST 2022

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •