M
Mangalaganesh Balasubramanian
Hi,
I have a date (only hours:minutes:seconds) in a text file against
which i need to compare the current time.
The date in the text file is expressed in GMT.
How do i compare and compute the difference (i am only interested in
the hours,minutes and seconds)?
The only way looks like, creating a new Date/Calendar object from the
hh:mm:ss and setting the day, month and year from a new instance of
Date/Calendar and then computing the difference.
This could run into issues when we are in the next day while GMT is
still "yesterday" during which this computation would fail.
Are there other ways to do that?
Appreciate any assistance.
Thanks,
Manglu
I have a date (only hours:minutes:seconds) in a text file against
which i need to compare the current time.
The date in the text file is expressed in GMT.
How do i compare and compute the difference (i am only interested in
the hours,minutes and seconds)?
The only way looks like, creating a new Date/Calendar object from the
hh:mm:ss and setting the day, month and year from a new instance of
Date/Calendar and then computing the difference.
This could run into issues when we are in the next day while GMT is
still "yesterday" during which this computation would fail.
Are there other ways to do that?
Appreciate any assistance.
Thanks,
Manglu