diff --git a/world/main.cpp b/world/main.cpp index 713961220..4649e05c0 100644 --- a/world/main.cpp +++ b/world/main.cpp @@ -434,7 +434,7 @@ int main(int argc, char **argv) tod.year, tod.month, tod.day, - tod.hour, + tod.hour - 1, tod.minute ); } diff --git a/zone/gm_commands/set/time.cpp b/zone/gm_commands/set/time.cpp index 228a69fcd..a0c0fea7a 100755 --- a/zone/gm_commands/set/time.cpp +++ b/zone/gm_commands/set/time.cpp @@ -9,17 +9,11 @@ void SetTime(Client *c, const Seperator *sep) TimeOfDay_Struct world_time{}; zone->zone_time.GetCurrentEQTimeOfDay(time(0), &world_time); - auto time_string = fmt::format( - "{} (Timezone: {})", - Strings::ZoneTime(world_time.hour, world_time.minute), - Strings::ZoneTime(zone->zone_time.getEQTimeZoneHr(), zone->zone_time.getEQTimeZoneHr()) - ); - c->Message( Chat::White, fmt::format( "It is currently {}.", - time_string + Strings::ZoneTime(world_time.hour - 1, world_time.minute) ).c_str() ); @@ -27,15 +21,15 @@ void SetTime(Client *c, const Seperator *sep) } uint8 minutes = 0; - uint8 hours = Strings::ToUnsignedInt(sep->arg[2]) + 1; + uint8 hours = Strings::ToUnsignedInt(sep->arg[2]); if (hours > 24) { hours = 24; } uint8 real_hours = ( - (hours - 1) > 0 ? - (hours - 1) : + hours > 0 ? + hours : 0 ); @@ -47,21 +41,20 @@ void SetTime(Client *c, const Seperator *sep) } } + c->Message( Chat::White, fmt::format( - "Setting world time to {} (Timezone: {}).", - Strings::ZoneTime(hours, minutes), - Strings::ZoneTime(zone->zone_time.getEQTimeZoneHr(), zone->zone_time.getEQTimeZoneHr()) + "Setting world time to {}.", + Strings::ZoneTime(hours, minutes) ).c_str() ); zone->SetTime(real_hours, minutes); LogInfo( - "{} :: Setting world time to {} (Timezone: {})", + "{} :: Setting world time to {}.", c->GetCleanName(), - Strings::ZoneTime(hours, minutes), - Strings::ZoneTime(zone->zone_time.getEQTimeZoneHr(), zone->zone_time.getEQTimeZoneHr()) + Strings::ZoneTime(hours, minutes) ); } diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index eab4fc95b..8b92c7d13 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -1526,7 +1526,7 @@ void QuestManager::CreateGuild(const char *guild_name, const char *leader) { void QuestManager::settime(uint8 new_hour, uint8 new_min, bool update_world /*= true*/) { if (zone) - zone->SetTime(new_hour + 1, new_min, update_world); + zone->SetTime(new_hour, new_min, update_world); } void QuestManager::itemlink(int item_id) { diff --git a/zone/zone.cpp b/zone/zone.cpp index 7cd5a14ef..6b6a985e5 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1941,7 +1941,7 @@ void Zone::SetTime(uint8 hour, uint8 minute, bool update_world /*= true*/) zone_time.GetCurrentEQTimeOfDay(time(0), &eq_time_of_day->start_eqtime); eq_time_of_day->start_eqtime.minute = minute; - eq_time_of_day->start_eqtime.hour = hour; + eq_time_of_day->start_eqtime.hour = hour + 1; eq_time_of_day->start_realtime = time(0); /* By Default we update worlds time, but we can optionally no update world which updates the rest of the zone servers */