12-12-2007, 06:03 AM
If you use /clock with a negative offset, the current GMT is past midnight, and the current local time is not yet past midnight, the displayed time is incorrect. This is probably more clear with an example.
Assuming GMT is 01:37, the command "/clock -5" should display 20:37; however, it actually displays 05:37. The problem appears to be a wrong sign in use in lvp.pwn line 4176. When the timezone clock variable is negative it gets subtracted from 24, wrongly resulting in a value greater than 24 which then gets further adjusted. If this variable is instead added to 24 the correct time should get set.
Note: I wasn't sure if this was what Mike had reported back in September and didn't see anything on the todo list so I figured I'd post a new topic about it.
Assuming GMT is 01:37, the command "/clock -5" should display 20:37; however, it actually displays 05:37. The problem appears to be a wrong sign in use in lvp.pwn line 4176. When the timezone clock variable is negative it gets subtracted from 24, wrongly resulting in a value greater than 24 which then gets further adjusted. If this variable is instead added to 24 the correct time should get set.
Note: I wasn't sure if this was what Mike had reported back in September and didn't see anything on the todo list so I figured I'd post a new topic about it.