There is currently no official specification for moon time.
This document is an unofficial specification for moon time, produced by Lachlan, Knight of The Society of Moon People.
This specification aims to achieve the following:
1 MC = 11 MA
1 MA = 4 MeM
1 MeM = 59 Md
1 Md = 10MS
1 MS = 40 MM
1 MM = 100M
1 M = 200 m
1 MC = 102,134,428 seconds or 4.10455359 years
1 MA = 9,284,948 seconds or 3.58215586 months
1 MeM = 2,321,237 seconds or 26.8661689 days
1 Md = 39,343 seconds or 10.9286111 hours
1 MS = 3934.3 seconds or 1.09230556 hours
1 MM = 98.3575 seconds or 1.63929167 minutes
1 M = 0.983575 seconds
1 m = 0.00497875 seconds
1 Moon Chunk : 1 MC
1 Moon Annual : 1MA
1 Mega Moon Moment : 1MeM
1 Moon Day : 1Md
1 Moon Segment : 1MS
1 Moon Moment : 1MM
1 Mini Moon Moment : 1M
1 Micro Moon Moment : 1m
[this information has been redacted for privacy]
It's important to note that some data in the reference material is incorrect.
Multiplying the conversion of 0.00497875 seconds per Micro Moon Moment by 200 will give a length of 0.99575 seconds for a Mini Moon Moment, which is inconsistent with the 0.983575 seconds stated in the reference material. If you check each conversion manually, you'll find that the only one that seems to be inconsistent with the others is 0.00497875 seconds per Micro Moon Moment (all other conversions multiply correctly with the unit sizes to other conversions).
It should therefore be safe to assume that this calculation was scribed incorrectly, and the actual length of time for a Micro Moon Moment should be 0.004917875 seconds (from 0.983575 / 200). If working with moon time, use a conversion of 0.004917875 seconds per Micro Moon Moment.
It's not detailed in the reference material, but the moon time epoch is the release date of Bonnie Tyler's Total Eclipse of the Heart. In UTC time this is Wed, 09 Feb 1983 00:00:00 GMT. In UNIX time this epoch is at 413596800 seconds. Moon time begins at 01:00:00 1st McCartney, McDonough, 0.
Store all moon times & dates as the number of micro moon moments since the moon time epoch. This allows for fairly simple conversion between solar (normal) and moon time whenever necessary.
When formatting a moon time, use the micro moon moment conversion to convert a solar time to moon time if necessary, and then use the unit sizes to calculate the different units - DO NOT use the 'XYZ seconds' approximations displayed above, as they are only approximations and will introduce more risk of floating point inaccuracy.
Use the moon time units exactly as displayed in the reference material, and ensure that you keep the capitalisation consistent. The Society of Moon People does not take these infractions lightly.
A public NTP-like API is available for syncing moon time across devices via a central server. It uses the same calculations as NTP, but not the same protocol, it just operates over HTTP with JSON (I didn't feel like doing it properly). It would be impossible to make any solar-time-based device obey the moon flavour of NTP regardless.
Endpoint: https://api.dynodel.com/moon/v2
Requests return a JSON object with the following keys, providing the following information:
Record the duration of the request from start to end on the client device. Record the duration in solar time and then convert it to moon time (since this is only a moon time duration, you don't need to worry about the epoch). We'll call this request duration client_req_m. Then, you can calculate an approximation of the 'true' server-synchronised moon time like so:
server_time = local_m + (client_req_m - exec_m) / 2For more information, read more about the Network Time Protocol. This isn't a very precise implementation and definitely doesn't follow the protocol, but it fulfils the requirements for moon time.