In Java, LocalDateTime.now() returns a LocalDateTime that holds the current date and the current time, read from the system clock in the computer's default time zone.
The result has no zone attached: it is only the date and the clock time you would see on a wall clock. There are two other versions, now(ZoneId) and now(Clock), that let you pick the zone or the clock.
A static method of java.time.LocalDateTime (since Java 8): call it on the class, as LocalDateTime.now(), with no object needed. Add import java.time.LocalDateTime; at the top of your file.
Syntax
Call the static method on the class. No new is needed.
Java
LocalDateTime a = LocalDateTime.now(); // system default zone
LocalDateTime b = LocalDateTime.now(ZoneId.of("Asia/Tokyo")); // a chosen zone
LocalDateTime c = LocalDateTime.now(Clock.systemUTC()); // a chosen clock
Call
What it does
LocalDateTime.now()
The current date and time in the default time zone.
LocalDateTime.now(zone)
The current date and time in the given ZoneId.
LocalDateTime.now(clock)
The date and time that a Clock reports. Use a fixed clock in tests.
LocalDate.now()
Only the date, without the time.
The value is different every time you run the program, so the examples on this page print facts about it instead of the value itself.
Library declarations
Java
// java.time.LocalDateTime
public static LocalDateTime now()
public static LocalDateTime now(ZoneId zone)
public static LocalDateTime now(Clock clock)
Parameters
Parameter
Description
None
now() takes no parameters.
zone (ZoneId)
Optional. The time zone to read the time in, such as ZoneId.of("Asia/Tokyo").
clock (Clock)
Optional. The clock to read from. Clock.fixed() always returns the same moment.
Return Value
Return Value
Description
LocalDateTime
The current date and time, without any zone information.
One fixed moment.Instant.parse reads 10:30 UTC on 15 March 2026.
Two fixed clocks.Clock.fixed(moment, zone) always reports that moment, as seen from the given zone.
UTC.now(utcClock) shows 10:30.
India. India is 5 hours 30 minutes ahead of UTC, so the same moment shows as 16:00. The output never changes, which makes tests easy.
Example 3 — Read the Time in Another Zone
Read the time in UTC and in Tokyo and print how many hours apart they are.
Java
import java.time.Duration;
import java.time.LocalDateTime;
import java.time.ZoneId;
public class LdtNowZone {
public static void main(String[] args) {
LocalDateTime utc = LocalDateTime.now(ZoneId.of("UTC"));
LocalDateTime tokyo = LocalDateTime.now(ZoneId.of("Asia/Tokyo"));
long hours = Duration.between(utc, tokyo).toHours();
System.out.println("Tokyo is ahead of UTC by " + hours + " hours");
}
}
Output
Tokyo is ahead of UTC by 9 hours
How It Works
Two zones.now(ZoneId) reads the current moment and shows it as the wall-clock time of that zone.
Different clock times. The two values have the same date-time only if the zones match, which they do not.
Measure the gap.Duration.between(utc, tokyo) gives the difference, and toHours() turns it into whole hours.
Tokyo is UTC+9. The tiny time between the two calls is lost when the duration is cut to whole hours, so the answer is 9.
Frequently Asked Questions
Use LocalDateTime.now(). For only the date use LocalDate.now(), and for only the time use LocalTime.now().
Use LocalDateTime.now(ZoneId.of("Asia/Tokyo")), or ZonedDateTime.now(zone) if you also want the zone kept in the result.
Pass a Clock into your code and call LocalDateTime.now(clock). In tests use Clock.fixed(...) so the time never changes.
No. It only stores the date and the clock time. Use ZonedDateTime.now() or OffsetDateTime.now() if you need the zone or offset.
It uses the default time zone of the machine. Pass an explicit ZoneId, or set the server to UTC, to get the same result everywhere.