1. Field of the Invention
The present invention pertains to configuring the system time of a computer according to the time zone in which the computer is to be located. More particularly, the present invention relates to automatically adjusting a computer's system time via a COM port.
2. Related Art
Accurate computer system times are required in a wide variety of applications, such as in managing and tracking electronic mail (email), timing back-ups of data on a network, synchronizing communications between clients and servers, and managing multimedia teleconferences. However, clients, servers and users are often located in different time zones, and the time differences must be taken into account appropriately. Further, the system times of most computers are subject to a certain amount of error, or “drift.”
Various techniques have been developed to adjust the system times of computers. Traditional techniques involve operators manually adjusting the system times. However, these techniques are inconvenient for operators and are subject to human error.
With the recent rapid development of network technology, techniques for adjusting system times through networks are gradually replacing traditional methods. A server maintains a highly accurate system time, and provides an accurate system time reading to other computers through a network. Methods for adjusting the system time of a computer through a network are disclosed in various patents. These methods involve adjusting system times of computers through reading a time server. However, the methods are inadequate when newly manufactured computers are shipped to a particular marketplace in a different time zone. Generally, it is desirable that the computers are appropriately pre-adjusted prior to dispatch. The above-described methods do not take into account the difference between the time zone in which the computer manufacturer is located and the time zone in which the marketplace is located.
In addition, the above-described methods do not address any conversion of the system time format of each computer that may be needed when the computer is shipped between the time zones. For example, in the country of the manufacturer, it may be customary for time to be expressed in a twelve-hour format, whereas in the country of the marketplace, it may be customary for time to be expressed in a twenty-four hour format. In such circumstances, upon arrival at destination, the system time of a computer is often incorrect. This is because the system time was adjusted to local time prior to dispatch, and/or because the time format of the computer is inappropriate.
Therefore, what is needed is a system and method for automatically adjusting computer system times via a COM port, which not only can adjust computer system times, but can also provide conversions of the time zone and/or the time format.
A main objective of the present invention is to provide a system and method for automatically adjusting computer system times through a COM port, which converts time zones and/or time formats appropriately.
To achieve the above objective, a system for automatically adjusting computer system times through a COM port in accordance with a preferred embodiment of the present invention comprises one or more computers whose system times are to be adjusted, and a time loading apparatus. Each computer stores a time difference table containing information on time zones and time difference values. The computer comprises a plurality of software function modules: a setting module for determining whether there is a new settings for a computer according to its destination; a request generating module for generating a time obtaining request, and transmitting the time obtaining request to the time loading apparatus; a searching module for searching a time difference value of the destination in the time difference table; a converting module for converting a current time received from the time loading apparatus into a system time of the destination according to the formula: system time of the destination=current time+time difference value of the destination, and converting the format of the current time if the stored time format is different from the format of the current time; and a system time adjusting module for adjusting system time of the computer according to the conversion.
Further, the present invention provides a preferred method for automatically adjusting computer system times through a COM port. The method comprises the steps of: (a) determining whether there is a new setting for a computer according to its destination; (b) receiving the new setting(s) and storing the new setting(s), if there is a new setting; (c) generating a time obtaining request, and transmitting the time obtaining request to a time loading apparatus via a COM port; (d) obtaining a current time of the time loading apparatus according to the time obtaining request, and transmitting the current time to the computer; (e) receiving the current time; (f) searching a time difference value of the destination in a time difference table, and storing the time difference value; (g) converting the current time received from the time loading apparatus into a system time of the destination according to the formula: system time of the destination=current time+time difference value of the destination, and converting the format of the current time into the stored time format, if the stored time format is different from the format of the current time; (h) adjusting the system time of the computer according to the conversions; (i) determining whether there is any other computer whose system time needs to be adjusted; and (j) returning to step (a) in respect of another computer, if there is any other computer whose system time needs to be adjusted.
Other objects, advantages and novel features of the present invention will be drawn from the following detailed description of a preferred embodiment and preferred method with the attached drawings, in which:
In the preferred embodiment, each computer 1 is a brand personal computer (PC) that has just been assembled at a factory, and is scheduled to be shipped to a particular marketplace. However, this should not be construed as limiting the invention in any way, and the invention and following description are equally applicable to any other computing devices whose system times need to be adjusted for any of various reasons. The computer 1 stores a time difference table containing information on time zones and time difference values. Each time zone corresponds to a time difference value. The time difference value is a difference between a base time zone (e.g., a time zone in which the computer manufacturer is located) and a designated time zone (e.g., a time zone in which the marketplace is located). The time difference value of the base time zone is set as zero, and the time difference value of any marketplace is either a positive number or a negative number. Therefore, before the computer 1 is shipped to the designated marketplace in a different time zone, the system time of the computer 1 needs to be adjusted to a system time of the marketplace according to the formula: system time of the marketplace=current time of the base time zone+time difference value of the marketplace. For example, when the computer manufacturer is in China with a current system time “10:30:20,” and the marketplace is in Japan with a time difference value “+1,” the system time of the computer 1 to be shipped to Japan is adjusted to “11:30:20” according to the formula. The computer 1 comprises a plurality of software function modules (described in detail below in relation to
If there is a new setting, in step S401, the setting module 10 receives the new setting for the time zone and/or the time format of the computer 1, and stores the new setting(s) in the computer 1.
In step S402, the request generating module 11 generates a time obtaining request, and transmits the time obtaining request to the time loading apparatus 2 via the COM port 3. In step S403, the time loading apparatus 2 receives the time obtaining request from the computer 1, obtains a current time from itself, and transmits the current time to the computer 1.
In step S404, the time receiving module 13 receives the current time from the time loading apparatus 2. In step S405, the searching module 14 searches a time difference value of the stored time zone (i.e., of the target marketplace) in a time difference table, and stores the time difference value.
In step S406, the converting module 15 converts the current time received from the time loading apparatus 2 into a system time of the marketplace according to the formula: system time of the marketplace=current time+time difference value of the marketplace. The converting module 15 also converts the format of the current time into the stored time format, if the stored time format is different from the format of the current time. The stored time format may, for example, be a twelve-hour format or a twenty-four hour format. In step S407, the system time adjusting module 16 adjusts the system time of the computer 1 according to the conversion result(s). In step S408, the system time adjusting module 16 determines whether there is any other computer 1 whose system time needs to be adjusted. If there is another computer 1 whose system time needs to be adjusted, the procedure returns to step S400 described above. In contrast, if the system times of all the computers 1 have been adjusted, the procedure is finished.
Further, although the present invention has been specifically described on the basis of a preferred embodiment and preferred method, the invention is not to be construed as being limited thereto. Various changes or modifications may be made to the embodiment and method without departing from the scope and spirit of the invention.
Number | Date | Country | Kind |
---|---|---|---|
93126636 | Mar 2004 | TW | national |