JPH0573168A - Date processor - Google Patents

Date processor

Info

Publication number
JPH0573168A
JPH0573168A JP3236551A JP23655191A JPH0573168A JP H0573168 A JPH0573168 A JP H0573168A JP 3236551 A JP3236551 A JP 3236551A JP 23655191 A JP23655191 A JP 23655191A JP H0573168 A JPH0573168 A JP H0573168A
Authority
JP
Japan
Prior art keywords
time
date
month
added
year
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3236551A
Other languages
Japanese (ja)
Inventor
Wataru Tochigi
杤木渉
Satoshi Minegishi
峰岸聰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Solution Innovators Ltd
Original Assignee
NEC Solution Innovators Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Solution Innovators Ltd filed Critical NEC Solution Innovators Ltd
Priority to JP3236551A priority Critical patent/JPH0573168A/en
Publication of JPH0573168A publication Critical patent/JPH0573168A/en
Pending legal-status Critical Current

Links

Landscapes

  • Electric Clocks (AREA)

Abstract

PURPOSE:To add the optimum information on year and month to the date and time information having the only date and time by comparing it with the time taking the advance into account while taking the error of the opposite device into account. CONSTITUTION:A device A, provided with a time holding means 1, a comparison means 2, and a discrimination means 3, keeps the time difference between the time shown by the information T included in the data received from the opposite device B and data reception time T0 presented by the self device A within + or -t minutes periodically. Then time T+1 adding (t) minutes to the data reception time T0 is obtained, the date and time of this time T+1 and time information T of the received data are compared. If the comparison result is T<=T+1, the date of the time T+1 is added as it is. When the comparison result is T<T+1, the date of one month before the time T+1 is added. When this date is the one without the date of the time information T to which this date is added, the date one more month before the date added to the time information T is added. This processing is repeated until it becomes the date where this date actually exists.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、日付の判定手段に利用
する。特に、年月のない日付情報に年月を付加する処理
手段に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is used for date determination means. In particular, it relates to a processing means for adding a year and month to date information without a year and month.

【0002】[0002]

【従来の技術】従来、年月情報を付加する手段として
は、受信データに含まれる日付、時刻(日時分秒)とそ
のデータを受信した時刻(年月日時分秒)との相互を日
時分秒レベルで比較し、同じか受信データのほうが遅れ
ている場合には受信した時刻の年月を付加し、受信デー
タの方が進んでいた場合には受信した時刻の一ヵ月前の
年月を付加していた。
2. Description of the Related Art Conventionally, as means for adding year / month information, the date / time (date / time / minute / second) included in the received data and the time (year / month / day / hour / minute / second) which received the data are mutually date / time / minute. Compare at the second level.If the same or the received data is delayed, the year and month of the received time is added.If the received data is ahead, the year and month before the received time is added. Had been added.

【0003】[0003]

【発明が解決しようとする課題】このような従来例で
は、相手装置の内蔵する時刻が自装置の内蔵する時刻よ
り進んでいる場合に、一ヵ月前のデータとして認識して
しまう欠点があった。
In such a conventional example, there is a drawback in that when the time stored in the partner device is ahead of the time stored in the own device, the data is recognized as one month old data. ..

【0004】本発明は、このような欠点を除去するもの
で、最適な年月を判定して付加する手段をもつ日付処理
装置を提供することを目的とする。
The present invention eliminates such drawbacks, and an object of the present invention is to provide a date processing device having means for determining and adding an optimum year and month.

【0005】[0005]

【課題を解決するための手段】本発明は、異機種の相手
装置から受信するデータに含まれる日付時刻情報に年月
情報を付加する日付処理装置において、相手装置から受
信するデータに含まれる日付時刻情報Tの示す時刻を自
装置が示すデータ受信時の年月情報の付加された日付時
刻T0 に対して所定時間だけ遅進する時刻T0 ±tの範
囲以内に定期的に保つ手段と、自装置が示すデータ受信
時の日付時刻T0 に上記所定時間t分を加算した時刻T
+tを求め、この時刻T+tの日時分秒と受信したデータの
時刻情報Tの示す時刻の日時分秒とを比較する手段と、
この比較する手段の比較結果がT≦T+tであれば年月情
報の付加された日付時刻T+tの年月を日付時刻情報Tの
示す日付時刻に付加し、また比較結果がT>T+tであれ
ば年月情報の付加された日付時刻T+tの年月より一ヵ月
前の年月を付加し、この年月が付加された日付時刻Tの
年月日が存在しない日付であればこの年月日が実在する
日付になるまでさらに一ヵ月前の年月への変更処理を繰
り返す手段とを備えたことを特徴とする。
SUMMARY OF THE INVENTION According to the present invention, in a date processing device for adding year / month information to date / time information included in data received from a partner device of a different model, a date included in data received from the partner device. A means for regularly maintaining the time indicated by the time information T within a range of time T 0 ± t which is delayed by a predetermined time with respect to the date time T 0 to which the date and time information at the time of reception of data indicated by the own device is added. , A time T obtained by adding the predetermined time t minutes to the date and time T 0 at the time of data reception indicated by the own device.
+ seek t, and means for comparing the time of day, hour, minute and second indicated by time information T of the received data with date, hour, minute, and second of the time T + t,
If the comparison result of the comparing means is T ≦ T + t , the year / month of the date / time T + t to which the year / month information is added is added to the date / time indicated by the date / time information T, and the comparison result is T> If it is T + t , the date and time with the year and month information is added. The year and month one month before the year and month of the time T + t is added, and this date is added. In that case, it is characterized in that it is provided with a means for repeating the process of changing to a year and a month before this date until an actual date.

【0006】[0006]

【作用】相手装置Bから受信したデータに含まれる時刻
情報Tの示す時刻と自装置Aが示すデータ受信時刻T0
との時刻差を±t分以内に定期的に保つ。つぎに、デー
タ受信時刻T0 にt分を加算した時刻T+tを求め、この
時刻T+tの日時分秒と受信したデータの時刻情報Tとを
比較し、この比較結果がT≦T+tであれば時刻T+tの年
月をそのまま付加し、また比較結果がT>T+tであれば
時刻T+tの年月より一ヵ月前の年月を付加し、この年月
が付加された時刻情報Tの年月日が存在しない日付であ
れば、時刻情報Tに付加した年月よりさらに一ヵ月前の
年月を付加してこの年月日が実際に存在する日付になる
までこの処理を繰り返す。これにより、相手装置Bの時
刻が自装置Aより進んでいた場合に一ヵ月前のデータと
判定してしまう欠点を排除することができる。
The time indicated by the time information T contained in the data received from the partner device B and the data reception time T 0 indicated by the own device A.
The time difference between and is periodically maintained within ± t minutes. Next, the time T + t is calculated by adding t minutes to the data reception time T 0 , and the date / time / minute / second of this time T + t is compared with the time information T of the received data. If + t , the year and month at time T + t are added as is. If the comparison result is T> T + t , the year and month one month before the year and month at time T + t are added, and this year and month is added. If the date of the time information T added with does not exist, the date that is one month before the date added to the time information T is added to the date when this date actually exists. This process is repeated until it becomes. As a result, it is possible to eliminate the defect that the data of the other device B is judged to be one month before when the time of the other device B is ahead of that of the own device A.

【0007】[0007]

【実施例】以下、本発明の一実施例について図面を参照
して説明する。図1は、この実施例の構成を示すブロッ
ク構成図である。この実施例は、図1に示すように、装
置Bから受信するデータに含まれる日付時刻情報Tの示
す時刻を装置Aが示すデータ受信時の年月情報の付加さ
れた日付時刻T0 に対して所定時間だけ遅進する時刻T
0 ±tの範囲以内に定期的に保つ手段である時刻保持手
段1と、装置Aが示すデータ受信時の日付時刻T0 に上
記所定時間t分を加算した時刻T+tを求め、この時刻T
+tの日時分秒と受信したデータの時刻情報Tの示す時刻
の日時分秒とを比較する手段である比較手段2と、この
比較手段2の比較結果がT≦T+tであれば年月情報の付
加された日付時刻T+tの年月を日付時刻情報Tの示す日
付時刻に付加し、また比較結果がT>T+tであれば年月
情報の付加された日付時刻T+tの年月より一ヵ月前の年
月を付加し、この年月が付加された日付時刻Tの年月日
が存在しない日付であればこの年月日が実在する日付に
なるまでさらに一ヵ月前の年月への変更処理を繰り返す
手段である判定手段3とを備える。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of this embodiment. In this embodiment, as shown in FIG. 1, the time indicated by the date / time information T included in the data received from the device B is compared with the date / time T 0 to which the year / month information at the time of data reception indicated by the device A is added. Time T which is delayed by a predetermined time
Time holding means 1 which is means for periodically holding within the range of 0 ± t, and time T + t obtained by adding the predetermined time t minutes to the date and time T 0 at the time of data reception shown by the device A are obtained, and this time is obtained. T
+ t date / time / minute / second and the date / time / minute / second of the time indicated by the time information T of the received data, and if the comparison result of this comparison means 2 is T ≦ T + t The year and month of the date and time T + t to which the month information is added is added to the date and time indicated by the date and time information T, and if the comparison result is T> T + t , the date and time T + to which the year and month information is added. If a date that is one month before the date of t is added and the date and time of the date and time T does not exist, it will take another month until this date becomes an actual date. The determination means 3 is a means for repeating the process of changing to the previous year and month.

【0008】次に、この実施例の動作を説明する。図2
は本発明を取り込んだシステムの一例である。装置Aよ
り装置Bの時刻を定期的に読み出し、装置Aの時刻と比
較して±t分以上の誤差があれば装置Aから装置Bに時
刻の設定を行い、装置Aと装置Bとの時間の誤差は常に
±t分以内に管理されている。また、装置Bで発生した
データはリアルタイムで装置Aに送信しようとするが、
装置Aと装置Bと間に回線障害が発生している場合には
装置Aに送信が遅れてしまう。以下、説明の便宜上 T:相手装置から受信したデータに含まれる日付時刻情
報(日時分秒) T0 :相手装置からデータを受信した日付時刻(年月日
時分秒) T+t:T0 にt分をプラスした日付時刻(年月日時分
秒) T-t:T0 からt分をマイナスした日付時刻(年月日時
分秒) −T+t:T+tより一ヵ月前の日付時刻(年月日時分秒) とする。Tは年月情報が含まれないので、Tのとり得る
範囲は1日0時0分0秒から31日23時59分59秒
の一ヵ月間である。また、T-tの日時分秒より小さいT
をもつデータは存在するが、T+tの日時分秒より大きい
Tをもつデータは時間の誤差が常に±t分以内であるこ
とより明らかにT+tより過去のデータである。よってT
のとり得る範囲はT+tより過去一ヵ月間とみなす。
Next, the operation of this embodiment will be described. Figure 2
Is an example of a system incorporating the present invention. The time of the device B is periodically read from the device A, and if there is an error of ± t minutes or more compared with the time of the device A, the time is set from the device A to the device B, and the time between the device A and the device B is set. The error of is always managed within ± t minutes. Also, the data generated by the device B tries to be transmitted to the device A in real time.
If a line failure occurs between the device A and the device B, the transmission to the device A will be delayed. Hereinafter, for convenience of explanation, T: date / time information (date / time / minute / second) included in data received from the partner device T 0 : date / time (year / month / day / hour / minute / second) data received from the partner device T + t : to T 0 Date time plus t minutes (year month day hour minute second) T -t : Date time minus t minutes from T 0 (year month hour day minute second) -T + t : Date time one month before T + t (Year / month / day / hour / minute / second) Since T does not include year / month information, the range that T can take is from 00:00:00 to 31: 23: 59: 59 on 31st. Also, the date and time of T -t is smaller than T
Present data with, but the data with date, hour, minute, and second is greater than T in the T + t is the historical data from apparently T + t from that error of time is always within ± t min. Therefore T
The range that can be taken is considered to be the past one month from T + t .

【0009】次に、T+tより過去一ヵ月間を考え、日付
時刻の判定方法を図3を参照して説明する。図3
(a)、(b)、(c)のそれぞれの上側の直線はT0
のとり得る日時を表し、任意の年月である。図3
(a)、(b)、(c)のそれぞれの下側の直線はTの
とり得る範囲で左端の白丸(○)の日時は含まず右端の
黒(●)の日時は含む。はじめに図3(a)は月の変り
目が−T+tにあるときである。このときにTはT+tの日
時分秒より遅れているか等しい(以下T≦T+tと記す)
ので、Tに付加すべき年月はT+tの年月と同じである。
次に図3(b)は月の変り目が−T+tとT0 の間にある
ときである。このとき(ii)の範囲にTがあればT≦T
+tでありTに付加すべき年月はT+tの年月と同じであ
る。(i)の範囲にTがあるときはTに付加すべき年月
はT+tより一ヵ月前の年月とする。このときにTとT+t
の日時分秒を比較するとTのほうがT+tの日時分秒より
進んでいる(以下T>T+tと記す)関係にある。最後に
図3(c)は月の変り目がT0 とT+tの間にあるときで
ある。このとき(ii)の範囲にTがあればT≦T+tであ
り、Tに付加すべき年月はT+tの年月と同じである。
(i)の範囲にTがあればTに付加すべき年月はT+t
年月より一ヵ月前の年月とする。このときはT>T+t
ある。
Next, considering the past month from T + t, a method of determining the date and time will be described with reference to FIG. Figure 3
The upper straight lines of (a), (b), and (c) are T 0.
Represents the possible date and time, which is an arbitrary year and month. Figure 3
The lower straight line of each of (a), (b), and (c) is a range that T can take, and does not include the date and time of the white circle (◯) at the left end and the date and time of the black (●) at the right end. First, FIG. 3A shows the case where the lunar turn is at −T + t . At this time, T is equal to or later than the date, time, minute, second of T + t (hereinafter referred to as T ≦ T + t ).
Therefore, the year and month to be added to T is the same as the year and month of T + t .
Next, FIG. 3B shows the case where the lunar turn is between −T + t and T 0 . At this time, if T is in the range of (ii), T ≦ T
+ t and the year and month to be added to T are the same as T + t . When T is in the range of (i), the year and month to be added to T is one month before T + t . At this time T and T + t
Comparing the date, time, minute, and second, the T is ahead of the date, time, minute, second of T + t (hereinafter referred to as T> T + t ). Finally, FIG. 3 (c) shows when the lunar turn is between T 0 and T + t . At this time, if T is in the range of (ii), T ≦ T + t , and the year / month to be added to T is the same as the year / month of T + t .
If there is T in the range of (i), the year and month to be added to T is one month before the year and month of T + t . At this time, T> T + t .

【0010】以上よりT≦T+tのときはTはT+tの年月
と同じであり、T>T+tのときはTはT+tの年月より過
去の年月であると判定する。
From the above, when T ≦ T + t , T is the same as the year and month of T + t , and when T> T + t , T is the year and month before the year and month of T + t. judge.

【0011】次に、本発明の処理方式の流れを図4を参
照して説明する。まず、相手装置からデータを受信した
時刻T0 にt分をプラスした時刻T+tを求める(ステッ
プS3−1)。次に受信データの時刻情報TとT+tの日
時分秒を比較する(ステップS3−2)。比較した結果
がT≦T+tであればT+tの年月をそのまま付加し(ステ
ップS3−4)処理を終える。比較した結果がT>T+t
であればT+tの年月より一ヵ月前の年月を付加し(ステ
ップS3−3)、年月を付加されたTの判定を行う(ス
テップS3−5)。年月を付加されたTの年月日が存在
しない日付(例えば、1990年2月29日とか199
0年11月31日)であればTに付加した年月よりさら
に一ヵ月前の年月を付加し(ステップS3−6)、再び
年月日の判定を行う(ステップS3−5)。年月を付加
されたTの年月日が実際に存在する日付であれば処理を
終える。
Next, the flow of the processing method of the present invention will be described with reference to FIG. First, the time T + t which plus t minutes to the time T 0 which has received data from the partner device (step S3-1). Next, the time information T of the received data is compared with the date / time / minute / second of T + t (step S3-2). If the comparison result is T ≦ T + t , the year and month of T + t is added as it is (step S3-4), and the process is ended. The comparison result is T> T + t
If so, the year and month one month before the year T + t is added (step S3-3), and the T with the year and month is determined (step S3-5). The date when the date of T to which the date is added does not exist (for example, February 29, 1990 or 199).
If the date is November 31, 0), a year and month before the year and month added to T are added (step S3-6), and the date is judged again (step S3-5). If the date of T to which the date has been added is a date that actually exists, the processing ends.

【0012】[0012]

【発明の効果】本発明は、以上説明したように、相手装
置の誤差を考慮して進みを考慮した時間と比較すること
により、日時分秒しかない日付時刻情報に最適と思われ
る年月を付加することができる効果がある。
As described above, according to the present invention, by considering the error of the partner device and comparing it with the time in which the advance is taken into consideration, the year and month which is considered to be the most suitable for the date and time information having only date, time, minute and second is determined. There is an effect that can be added.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明実施例の構成を示すブロック構成図。FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.

【図2】本発明実施例が適用されるシステムの構成を示
すブロック構成図。
FIG. 2 is a block configuration diagram showing a configuration of a system to which an embodiment of the present invention is applied.

【図3】本発明実施例の動作を示す説明図。FIG. 3 is an explanatory diagram showing the operation of the embodiment of the present invention.

【図4】本発明実施例の動作を示すフローチャート。FIG. 4 is a flowchart showing the operation of the embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1 時刻保持手段 2 比較手段 3 判定手段 1 time keeping means 2 comparing means 3 judging means

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 異機種の相手装置から受信するデータに
含まれる日付時刻情報に年月情報を付加する日付処理装
置において、 相手装置から受信するデータに含まれる日付時刻情報T
の示す時刻を自装置が示すデータ受信時の年月情報の付
加された日付時刻T0 に対して所定時間だけ遅進する時
刻T0 ±tの範囲以内に定期的に保つ手段と、 自装置が示すデータ受信時の日付時刻T0 に上記所定時
間t分を加算した時刻T+tを求め、この時刻T+tの日時
分秒と受信したデータの時刻情報Tの示す時刻の日時分
秒とを比較する手段と、 この比較する手段の比較結果がT≦T+tであれば年月情
報の付加された日付時刻T+tの年月を日付時刻情報Tの
示す日付時刻に付加し、また比較結果がT>T+tであれ
ば年月情報の付加された日付時刻T+tの年月より一ヵ月
前の年月を付加し、この年月が付加された日付時刻Tの
年月日が存在しない日付であればこの年月日が実在する
日付になるまでさらに一ヵ月前の年月への変更処理を繰
り返す手段とを備えたことを特徴とする日付処理装置。
1. A date processing device for adding year / month information to date / time information included in data received from a partner device of a different model, wherein date / time information T included in data received from the partner device.
Means for periodically maintaining the time indicated by ∘ within the range of time T 0 ± t, which is delayed by a predetermined time with respect to the date and time T 0 to which the date and time information at the time of data reception is added, The time T + t obtained by adding the above-mentioned predetermined time t to the date and time T 0 at the time of receiving the data indicated by is obtained, and the date, time, minute, second of this time T + t and the date, time, minute, second of the time indicated by the time information T of the received data. When the comparison result of this comparing means is T ≦ T + t , the year / month of the date / time T + t to which the year / month information is added is added to the date / time indicated by the date / time information T. If the comparison result is T> T + t , the year and month that is one month before the date and time T + t to which the year and month information is added is added, and the date and time T when this year and month is added. If the date does not exist, the process of changing the date one month before the actual date will be repeated. Date processing apparatus being characterized in that a to means.
JP3236551A 1991-09-17 1991-09-17 Date processor Pending JPH0573168A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3236551A JPH0573168A (en) 1991-09-17 1991-09-17 Date processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3236551A JPH0573168A (en) 1991-09-17 1991-09-17 Date processor

Publications (1)

Publication Number Publication Date
JPH0573168A true JPH0573168A (en) 1993-03-26

Family

ID=17002332

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3236551A Pending JPH0573168A (en) 1991-09-17 1991-09-17 Date processor

Country Status (1)

Country Link
JP (1) JPH0573168A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8126853B2 (en) 2008-09-22 2012-02-28 Nec Corporation Log managing apparatus, log managing system, log managing method and log managing program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8126853B2 (en) 2008-09-22 2012-02-28 Nec Corporation Log managing apparatus, log managing system, log managing method and log managing program

Similar Documents

Publication Publication Date Title
JPH0573168A (en) Date processor
JPH05225076A (en) Method and device for managing common information
JPS5878239A (en) Operation controlling circuit
JP2820088B2 (en) ATM cell transmission system
JPH0335346A (en) Mutual diagnostic method for multicomputer system
JP3043265B2 (en) Timer control method
JP2002312230A (en) Client server system, cache control method using it and program thereof
JP2587125B2 (en) Date setting device
CN118138831A (en) Multi-path video stream analysis method, system, equipment and storable medium
JP3299157B2 (en) Address information transmission control method and information processing device
JP2524673B2 (en) Direct memory access device
JPH03215128A (en) Power system supervisory control system
EP0851369A2 (en) Data variation detecting system
JPS60245346A (en) Reception controlling system
JPH04170242A (en) Frame timer control system
JPS61216090A (en) Picture processing system
JPH05119819A (en) Method and device for predicting working time of laser beam working machine
JPH1063952A (en) Journal output method
JPH0378059A (en) Recording system for program-to-program communication history
JPH0643962A (en) Time varying device for software clock
JPH06266639A (en) Information processing work station system
JPH1010249A (en) Correction device for time information
JPH0362149A (en) Data communication system
JPH04245076A (en) System for copying magnetic disk
JPS6341942A (en) Resumption processing system