Skip to content

Possibly a bug in os.time() #3621

@Alex-1248

Description

@Alex-1248

Mc 1.7.10
OpenComputers-MC1.7.10-1.8.1+c71c147-universal

I ran the file with the following content:

print(os.time()/(60*60*24))
print(os.date())

The first line returns the number of days elapsed since the start of the game. For some reason it returns a number close to x.0 when the in-game time is 01:00 and returns a number close to x.5 when the in-game time is 13:00. Judging by the position of the sun and moon, os.date() shows the correct time. Looks like os.time() counts down from 01:00 instead of 00:00. Is this intentional behavior?

os time() 1
os time() 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugOC feature is broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions