Tag

DateTimeFormatter

1 views collected around this technical thread.

Top Architecture Tech Stack
Top Architecture Tech Stack
Nov 7, 2024 · Backend Development

Date Formatting Techniques in Spring Boot Applications

This article explains why consistent date formatting is crucial in Spring Boot APIs, outlines common scenarios such as front‑end data exchange, database storage and logging, and presents multiple server‑side and client‑side solutions—including SimpleDateFormat, DateTimeFormatter, global Jackson settings, annotations, custom converters, and timestamp output—complete with code examples.

DateTimeFormatterJacksonJava
0 likes · 12 min read
Date Formatting Techniques in Spring Boot Applications
Top Architecture Tech Stack
Top Architecture Tech Stack
Nov 4, 2024 · Backend Development

Date Formatting Techniques in Spring Boot Applications

This article explains various Spring Boot approaches for formatting dates in API responses, covering frontend JavaScript utilities, Java SimpleDateFormat and DateTimeFormatter, global Jackson settings, annotation‑based formatting, custom converters, ControllerAdvice initBinder, and timestamp output methods.

DateTimeFormatterJacksonJava
0 likes · 12 min read
Date Formatting Techniques in Spring Boot Applications
Selected Java Interview Questions
Selected Java Interview Questions
Aug 31, 2023 · Backend Development

How to Solve SimpleDateFormat Thread Safety Issues in High-Concurrency Scenarios

This article presents several common solutions for addressing the thread‑safety problem of Java's SimpleDateFormat in high‑concurrency environments, including using local variables, synchronized blocks, Lock, ThreadLocal, Java 8 DateTimeFormatter, and Joda‑Time, and evaluates their performance and suitability.

DateTimeFormatterJavaThread Safety
0 likes · 17 min read
How to Solve SimpleDateFormat Thread Safety Issues in High-Concurrency Scenarios
Selected Java Interview Questions
Selected Java Interview Questions
Feb 12, 2023 · Backend Development

Comprehensive Guide to Java 8 Date and Time API

This article provides a thorough walkthrough of Java 8's date‑time API, covering formatting patterns, obtaining current dates and times, extracting components, creating specific dates, comparing dates, handling periodic events, timezone offsets, timestamps, custom parsing, common pitfalls, and thread‑safety considerations, all illustrated with clear code examples.

DateTimeDateTimeFormatterJava
0 likes · 24 min read
Comprehensive Guide to Java 8 Date and Time API
Selected Java Interview Questions
Selected Java Interview Questions
Sep 7, 2022 · Backend Development

Java Date and Time Formatting: Methods, Thread Safety, and Best Practices

This article compares three common Java date‑time formatting approaches—SimpleDateFormat, Java 8’s DateTimeFormatter, and Apache Commons Lang3’s DateFormatUtils—examines thread‑safety issues, provides code examples, and offers conversion utilities between Date, LocalDate, and LocalDateTime for robust backend development.

Apache CommonsDateTimeDateTimeFormatter
0 likes · 9 min read
Java Date and Time Formatting: Methods, Thread Safety, and Best Practices
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 18, 2021 · Backend Development

Understanding Thread Safety Issues with SimpleDateFormat and Solutions in Java

This article explains why SimpleDateFormat is not thread‑safe in Java, demonstrates the problem with multithreaded examples, and presents five practical solutions—including local variables, synchronized blocks, explicit locks, ThreadLocal, and the modern DateTimeFormatter—along with their advantages and drawbacks.

DateTimeFormatterJavaThread Safety
0 likes · 13 min read
Understanding Thread Safety Issues with SimpleDateFormat and Solutions in Java
Selected Java Interview Questions
Selected Java Interview Questions
Aug 23, 2020 · Backend Development

Understanding the Difference Between yyyy and YYYY, and dd and DD in Java Date Formatting

This article explains how using uppercase YYYY and DD in Java date patterns produces week‑based year and day‑of‑year values, leading to unexpected results around year boundaries, and provides code examples and best‑practice recommendations to avoid these formatting bugs.

DateTimeFormatterJavadate formatting
0 likes · 7 min read
Understanding the Difference Between yyyy and YYYY, and dd and DD in Java Date Formatting