From 624b23c7ac2e9d59e968f2a77171489f398675fb Mon Sep 17 00:00:00 2001 From: Merith-TK Date: Fri, 9 Apr 2021 20:45:59 -0700 Subject: [PATCH] Fix epoch documentation to use milliseconds (#580) --- patchwork.md | 9 ++++++++- .../java/dan200/computercraft/core/apis/OSAPI.java | 10 +++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/patchwork.md b/patchwork.md index 1e4b2208d..3c77140a9 100644 --- a/patchwork.md +++ b/patchwork.md @@ -305,9 +305,16 @@ little more detail. [1] https://github.com/SquidDev-CC/CC-Tweaked/wiki/Monitor-texture-reference ``` +``` 7f90f2f7cadce0d5b9177b16626979591bce8137 -``` + Clean up some examples a little bit Would be good if they didn't crash and burn on entry :). ``` + +``` +f194f4fa3a17c48ff1a9088d50063f4a675a23b6 + +Fix epoch documentation to use milliseconds (#580) +``` diff --git a/src/main/java/dan200/computercraft/core/apis/OSAPI.java b/src/main/java/dan200/computercraft/core/apis/OSAPI.java index 9a074e261..5e26e9431 100644 --- a/src/main/java/dan200/computercraft/core/apis/OSAPI.java +++ b/src/main/java/dan200/computercraft/core/apis/OSAPI.java @@ -326,14 +326,14 @@ public class OSAPI implements ILuaAPI { } /** - * Returns the number of seconds since an epoch depending on the locale. + * Returns the number of milliseconds since an epoch depending on the locale. * - * * If called with {@code ingame}, returns the number of seconds since the world was created. This is the default. * If called with {@code utc}, - * returns the number of seconds since 1 January 1970 in the UTC timezone. * If called with {@code local}, returns the number of seconds since 1 January + * * If called with {@code ingame}, returns the number of milliseconds since the world was created. This is the default. * If called with {@code utc}, + * returns the number of milliseconds since 1 January 1970 in the UTC timezone. * If called with {@code local}, returns the number of seconds since 1 January * 1970 in the server's local timezone. * - * @param args The locale to get the seconds for. Defaults to {@code ingame} if not set. - * @return The seconds since the epoch depending on the selected locale. + * @param args The locale to get the milliseconds for. Defaults to {@code ingame} if not set. + * @return The milliseconds since the epoch depending on the selected locale. * @throws LuaException If an invalid locale is passed. */ @LuaFunction