Link to home
Start Free TrialLog in
Avatar of Zolf
ZolfFlag for United Arab Emirates

asked on

Java compare dates

Hi there,

I am looking for a simple feature to add to my application for license purpose. I want to give it a license valid date say 01-01-2022 and want to compare the date to this license date. if it matches the date i want the application to exit the program.Can somebody please help me implement this.

cheers
Zolf
SOLUTION
Avatar of Alex [***Alex140181***]
Alex [***Alex140181***]
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, but of course a quick clock reset would defeat that, so it's better to use an API that's specifically designed to achieve your goal
Sure thing. Yes nowhere near perfect but the tedium and disruption to the machine from a clock reset can be severe and should put off a number of people.
I think what I’d do - if I redid things - is to poll a reliable network time server in my code, and compare the result to an embedded value in my code. The the miscreants can reset their clocks as often as they like.
if I redid things - is to poll a reliable network time server in my code
Firewall
zolf asks for ‘simple’. There being no such thing in most cases.
if I redid things - is to poll a reliable network time server in my code 
What if there is no internet available?!

Nevertheless, we're getting off topic here!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Zolf

ASKER

Thanks for your feedbacks!!
:)
You're welcome! Glad, we could help ;-)