Get Time
#12

Yes, there has been a leap second. This can also be considered, by leaving out a second if the Timestamp is greater than the time when it was added. The function can easily be adjusted for this, if needed in his case at all.

This function can handle all kinds of time offsets, simply add a command for a player to adjust his own time zone and reduce or increase the gettime() return value with the offset, before calling TimestampToDate, that's the way I used it, it worked perfectly for all areas of the world. This way daylight savings were taken into consideration too.

The video is pointless to me, because from my practical experience, I can tell, that there is no need for a plugin. It's been running for years and never had an issue apart from the reported one.
I try to prevent suggesting Plugins if not needed, because Plugins are pretty much a black box and you can never modify them easily. Once the creator stops supporting it or even deletes the Plugin, you can easily run into bigger problems, due to the Plugin not being updated anymore.

I, personally, wouldn't go with a plugin here. If you'd do, that's fine with me. I still wouldn't, since the simple function can handle all of the requirements too.
Reply


Messages In This Thread
Get Time - by Longover - 02.03.2019, 08:03
Re: Get Time - by Longover - 02.03.2019, 08:14
Re: Get Time - by Longover - 02.03.2019, 08:43
Re: Get Time - by Jeffry - 02.03.2019, 09:02
Re: Get Time - by Longover - 02.03.2019, 09:38
Re: Get Time - by Jeffry - 02.03.2019, 10:14
Re: Get Time - by Longover - 02.03.2019, 10:26
Re: Get Time - by Jeffry - 02.03.2019, 10:38
Re: Get Time - by Longover - 02.03.2019, 10:47
Re: Get Time - by Jeffry - 02.03.2019, 14:29
Re: Get Time - by Jeffry - 02.03.2019, 19:57
Re: Get Time - by Jeffry - 03.03.2019, 11:50
Re: Get Time - by Jeffry - 03.03.2019, 18:15
Re: Get Time - by masuzaron - 03.03.2019, 19:11

Forum Jump:


Users browsing this thread: 2 Guest(s)