21.07.2017, 12:01
Hello I have textdraw watch, it works perfect, but my host is in another country and there time is different. I want to add +1 hour +3 minutes and +15 seconds to equalize the time, but when I added, there were many bugs (9:52:72 (hours, minutes, seconds)). And I think there will be more bugs at the date. Here is my system:
Will you be able to add 1 hour, 3 minutes and 15 seconds to that time?
Quote:
new string[256],year,month,day,hours,minutes,seconds; getdate(year, month, day), gettime(hours, minutes, seconds); format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year); TextDrawSetString(Date, string); format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds); TextDrawSetString(Time, string); |