1. E

    Android Code Snippet DIY NTP Network Atomic Clock Time

    I just ported some NTP stuff from an old program. Querying an NTP server is surprisingly easy: just send it a 48 byte UDP packet with the first byte = 27 and the rest of them 0. The NTP server should return your 48 byte packet updated with the last 16 bytes set to two 64-bit timestamps, being...
  2. behnam_tr

    B4J Question Convert JS Code (UTC Time)

    I have a Code var r = globalActions.getUtcTime(-2e3) var i = r.getUTCHours() * 3600 + r.getUTCMinutes() * 60 + r.getUTCSeconds() console.log(r) console.log(i) //Mon Feb 05 2024 20:12:45 GMT+0330 (Iran Standard Time) //60165 i Want to Convert To B4j How ??
  3. symonator

    Android Question Auto-update device timezone daily so that sunrise time remains constant?

    Hey everyone! Background: I recently moved to Queensland (Australia) which doesn't have daylight savings like the southern states (where I'm from) do. Consequently, during summer the sun comes up at the ungodly hour of 4:45am or thereabouts. It got me thinking, would it be possible to design...