0

I know there are many ways to get the current date in Java but I couldn't find which of them get the date directly from the internet instead of device time.

The thing is, users changing their device time manually shouldn't have any effect on the date I get. Which way of getting time in Java should I use to prevent this from happening?

  • 2
    Does this answer your question? [How can I get the "network" time, (from the "Automatic" setting called "Use network-provided values"), NOT the time on the phone?](https://stackoverflow.com/questions/8049912/how-can-i-get-the-network-time-from-the-automatic-setting-called-use-netw) – Alon Yeager Mar 05 '20 at 14:37
  • https://stackoverflow.com/a/21760337/115145 – CommonsWare Mar 05 '20 at 14:39

0 Answers0