Summary of the invention
The embodiment of the invention provides a kind of method and device of automatic adjustment sun set/raise time, in order to solve the problem that the sun set/raise time that calculates in the prior art can not satisfy local habitual custom.
The embodiment of the invention provides a kind of method of automatic adjustment sun set/raise time, comprising:
Obtain current latitude and longitude information;
Obtain the GMT and the current time-zone information of sunrise sunset according to said latitude and longitude information;
Obtain the habitual time-zone information of administrative division at place, current time zone from network side;
Utilize the habitual time-zone information of administrative division at the GMT of said sunrise sunset, current time-zone information and place, current time zone, obtain the sun set/raise time in the habitual time zone of administrative division at place, current time zone.
The embodiment of the invention provides a kind of device of automatic adjustment sun set/raise time, comprising:
The longitude and latitude acquiring unit is used to obtain current latitude and longitude information;
Computing unit is used for the latitude and longitude information obtained according to said longitude and latitude acquiring unit, obtains the GMT and the current time-zone information of sunrise sunset;
Habitual time zone acquiring unit is used for obtaining the habitual time-zone information of administrative division that current time zone belongs to from network side;
The temporal information acquiring unit; Be used to utilize the GMT and the current time-zone information of the said sunrise sunset that said computing unit obtains; And the habitual time-zone information of administrative division that utilizes the place, current time zone that said habitual time zone acquiring unit obtains, obtain the sun set/raise time in the habitual time zone of administrative division at place, current time zone.
The method and the device of the automatic adjustment sun set/raise time that the embodiment of the invention provides; Through the habitual time-zone information of the administrative division of obtaining current time zone from network side; And the sun set/raise time on the same day that obtains the administrative division at place, current time zone according to the administrative division signal; Make the sun set/raise time on the same day that the terminal shows according to longitude and latitude; The time zone of using with the country of locality is consistent automatically, has realized that under the situation that the time zone changes be that the user is moving under the situation in another time zone from a time zone, used terminal can be automatically with the same day sun set/raise time adjust to and meet the local time of being accustomed to.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer; To combine the accompanying drawing in the embodiment of the invention below; Technical scheme in the embodiment of the invention is carried out clear, intactly description; Obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
The process flow diagram of the method for the automatic adjustment sun set/raise time that Fig. 1 provides for the embodiment of the invention.As shown in Figure 1, this method comprises:
Step 1, obtain current latitude and longitude information.
Particularly; Can pass through GPS (Global Positioning System; GPS), positioning systems such as GLONASS, Galileo, the Big Dipper; (Wireless Fidelity WIFI) obtains current latitude and longitude information in real time or regularly, and current latitude and longitude information is obtained in the instruction of the demonstration sun set/raise time that also can send according to the user maybe can to pass through base station, Wireless Fidelity.When current latitude and longitude information is obtained in the instruction of the demonstration sun set/raise time that sends according to the user, also can comprise before the step 1 receiving the instruction that shows sun set/raise time.
Step 2, obtain the GMT and the current time-zone information of sunrise sunset according to said latitude and longitude information.This step prior art capable of using calculates the GMT and the current time-zone information of sunrise sunset.
Step 3, obtain the habitual time-zone information of administrative division at place, current time zone from network side.
As passing through current time zone CDMA (Code Division Multiple Access; CDMA), WCDMA (Wideband Code Division Multiple Access, WCDMA) or network such as TD obtain the habitual time-zone information of administrative division at place, current time zone.
The habitual time-zone information of administrative division at step 4, the GMT of utilizing said sunrise sunset, current time-zone information and place, current time zone, the sun set/raise time in time zone is habitually practised in the administrative division that obtains place, current time zone.Supposing that the active user is positioned at the 6th time zone, Urumchi, is that Chinese habitual time zone is the i.e. sun set/raise time in the current time zone of time showing in the 8th time zone in Beijing with the i.e. administrative division in the 6th time zone in current time zone then.
Above-mentioned steps can be carried out by mobile communication terminal such as mobile phone or the positioning navigation device with communication function, and above-mentioned steps 3 can be carried out with step 2 simultaneously.
In the present embodiment; Through the habitual time-zone information of the administrative division of obtaining current time zone from network side; And the sun set/raise time on the same day that obtains the administrative division at place, current time zone according to the administrative division signal; Make the sun set/raise time on the same day that the terminal shows according to longitude and latitude; Automatically be consistent with local belonging country or area habitual time zone time, realized that under the situation that the time zone changes be that the user is moving under the situation in another time zone from a time zone, used terminal can be automatically with the same day sun set/raise time adjust to and meet the local time of being accustomed to.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be accomplished through the relevant hardware of programmed instruction; Aforesaid program can be stored in the computer read/write memory medium; This program the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
The structural representation of the device of the automatic adjustment sun set/raise time that Fig. 2 provides for the embodiment of the invention.As shown in Figure 2, comprising: longitude and latitude acquiring unit 21, computing unit 22, habitual time zone acquiring unit 23 and time information acquisition unit 24.
Longitude and latitude acquiring unit 21 passes through positioning systems such as GPS, GLONASS, Galileo, the Big Dipper, or obtains current latitude and longitude information in real time or regularly through base station, WIFI.Perhaps; The device of the automatic adjustment sun set/raise time that the embodiment of the invention provides can further comprise receiving element 25; Be used to receive the instruction of the demonstration sun set/raise time that the user sends; The instruction that longitude and latitude acquiring unit 21 receives according to receiving element 25 is obtained current latitude and longitude information through above-mentioned positioning system, base station or WIFI etc.
Computing unit 22 is used for obtaining according to longitude and latitude acquiring unit 21 GMT and the current time-zone information of sunrise sunset on the same day.Habitual time zone acquiring unit 23 is used for obtaining from network side the habitual time-zone information of administrative division at place, current time zone, obtains the habitual time-zone information of administrative division at place, current time zone like CDMA, WCDMA or TD network through current time zone.Temporal information acquiring unit 24 is used to utilize the GMT and the current time-zone information of the sunrise sunset that computing unit 22 obtains; And the habitual time-zone information of administrative division that utilizes the place, current time zone that habitual time zone acquiring unit 23 obtains, obtain to meet the sun set/raise time on the same day that the local time shows custom.
The device of the automatic adjustment sun set/raise time that the embodiment of the invention provides also can comprise display unit 26, is used to show that temporal information acquiring unit 24 obtains as meeting the sun set/raise time on the same day that the local time shows custom.Avoid being provided with in addition display device and come the demonstration time.
The device of the automatic adjustment sun set/raise time that the foregoing description provides can be mobile communication terminals such as mobile phone, also can be the positioning navigation device with communication function.
Transferring to Urumchi from the location in other time zones with a user is example; Suppose that this user carries the device of the automatic adjustment sun set/raise time that the foregoing description provides; Then longitude and latitude acquiring unit 21 in real time, regularly or according to user's instruction obtain the longitude and latitude that the locality is Urumchi: 43 ° of 54 ' 26.00 " 87 ° 28 ' 27.00 of N " E, computing unit 22 obtain the sun set/raise time in geographical time zone, Urumchi one day (+6): 05:40|18:33 according to this latitude and longitude information.Habitual time zone acquiring unit 23 obtains local administrative division from network side and belongs to China, and its habitual time zone is the 8th time zone.Temporal information acquiring unit 24 is according to the sun set/raise time of habitual the 8th time zone, time zone and geographical time zone (+6): 05:40|18:33; Sun set/raise time is adjusted into 07:40|20:33; Thereby realized the time showing of automatic adjustment sun set/raise time; Having solved in the prior art hand-held set can only be through manually being provided with the time zone or relying on geographical time zone fully, and the sun set/raise time of acquisition shows the problem that may mislead the user.
What should explain at last is: above embodiment is only in order to explaining technical scheme of the present invention, but not to its restriction; Although with reference to previous embodiment the present invention has been carried out detailed explanation, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these are revised or replacement, do not make the spirit and the scope of the essence disengaging various embodiments of the present invention technical scheme of relevant art scheme.