I have been using Java 11 LocalDateTime
but realised that it uses the time of the system. Are there alternatives that allow me to use the system time of a server or web time in my country?
Edit: After trying Instant I am very close to result I am after.
LocalDateTime ldt = LocalDateTime.ofInstant(Instant.now(), ZoneId.of("Europe/London"));
The Time is now correct but the date is still picking the system date? If I change the date to Christmas and the timezone of my system to UTC +1 Amsterdam the time will be ZoneId.of("Europe/London") UTC 0 but the date still shows as christmas. Any ideas?
@Ole V.V. I do not believe this is a duplicate question? similar, yes! duplicate no? If you can link me to what you believe is a duplicate that would be great.