2 * Empire - A multi-player, client/server Internet based war game.
3 * Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
4 * Ken Stevens, Steve McClure, Markus Armbruster
6 * Empire is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * See files README, COPYING and CREDITS in the root of the source
22 * tree for related information and legal notices. It is expected
23 * that future projects/authors will amend these files as needed.
27 * upda.c: Give the time of the next update
29 * Known contributors to this file:
30 * Markus Armbruster, 2007-2010
41 * Tell what the update policy is, and when the next update
47 time_t now, next, stop;
49 if (updates_disabled())
50 pr("UPDATES ARE DISABLED!\n");
53 next = update_time[0];
55 pr("\nUpdates occur at times specified by the ETU rates.\n\n");
56 pr("The next update is at %19.19s.\n", ctime(&next));
58 pr("There are no regularly scheduled updates.\n");
60 pr("The current time is %19.19s.\n\n", ctime(&now));
62 if (next && update_window) {
63 pr("The next update window starts at %19.19s.\n", ctime(&next));
64 stop = next + update_window;
65 pr("The next update window stops at %19.19s.\n", ctime(&stop));
68 switch (update_demand) {
72 case UPD_DEMAND_SCHED:
73 pr("Demand updates occur at update CHECK times.\n");
75 pr("The next update check is at %19.19s.\n", ctime(&next));
77 pr("Demand updates require %d country(s) to want one.\n",
80 case UPD_DEMAND_ASYNC:
81 pr("Demand updates occur right after the demand is set.\n");
82 if (*update_demandtimes != 0) {
83 pr("Demand updates are allowed during: %s\n",
86 pr("Demand updates require %d country(s) to want one.\n",
91 pr("Game days are: %s\n", game_days);
93 pr("Game hours are: %s\n", game_hours);
95 pr("\nThis command is obsolete and will go away in a future version.\n"
96 "Please use \"show updates\".\n");