Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    How to get the actual date?

    Scheduled Pinned Locked Moved Comments & Feedback
    lopy
    4 Posts 4 Posters 1.2k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      MJ
      last edited by

      Hi there, i am new to pycom devices and i try out the example for pytrack from the github and i cannot get the actual date but only stop at year 1970. May i know how can i solve this? Thanks in advance.

      0_1510882886177_e6c3f94d-d27a-441a-9eeb-cab93d8c44c2-image.png

      0_1510882903123_373198ca-ee03-4523-871f-7243d371b246-image.png

      robert-hhR C 2 Replies Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @MJ
        last edited by

        @mj According to the documentation:

        import machine
        rtc=machine.RTC()
        rtc.ntp_sync("pool.ntp.org")
        
        1 Reply Last reply Reply Quote 0
        • M Offline
          misterlisty
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • C Offline
            crumble @MJ
            last edited by

            You need a running WiFi and access to a time server. In the example from robert-HH the internet.

            If you still trying to get the GPS data. You can get the UTC time from the sentence parsed by the lib. And don't forget to read the documentation from the GPS/GNSS chip. The chip sends two sentences according if it receive signals from US or the russian sattelites. But the lib parses only the russian sentence. Maybe the US sentence works better in your area.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom