Tagged articles
date-formatting
36 articles · Page 1 of 1
This article explores advanced Jackson customization in Spring Boot, covering ObjectMapper configuration, global date formatting and BigDecimal precision handling, dynamic sensitive field desensitization using BeanSerializerModifier and ThreadLocal context, and streaming JSON generation with JsonGenerator to handle large datasets without memory overflow.
JacksonObjectMapperSerialization
0 likes · 19 min read

The article explains why front‑end date and enum parameters often cause parsing errors in Spring applications, describes the two independent conversion mechanisms in Spring MVC and Jackson, and provides a step‑by‑step guide to building global custom converters that unify date formats and enum mappings across the whole project.
Backend DevelopmentCustom ConverterEnum Mapping
0 likes · 17 min read

This tutorial explains how to use PHP's time(), date(), strtotime(), and date_default_timezone_set() functions to retrieve the current timestamp, format dates, perform date arithmetic, and configure timezones, providing practical code examples for each operation.
DATETIMEPHPdate-formatting
0 likes · 4 min read

This article explains why proper date formatting matters in Spring Boot applications, compares the default Jackson behavior, and presents five concrete approaches—including global configuration, @JsonFormat, custom ObjectMapper, @JsonComponent, and @JsonSerialize—detailing their implementations, advantages, and drawbacks.
JacksonJavaSpring Boot
0 likes · 8 min read

This article explains how to achieve consistent date and time formatting in Spring Boot applications by using SimpleDateFormat, configuring Jackson globally with spring.jackson properties, and applying @JsonFormat, @JsonComponent, and @Configuration annotations to handle various Java date types efficiently.
AnnotationsJSONSpring Boot
0 likes · 7 min read

This guide shows how to configure Jackson in Spring Boot to consistently format LocalDateTime, Date, and String parameters as "yyyy-MM-dd HH:mm:ss", covering global settings via application properties, field-level @JsonFormat, custom serializers/deserializers, and unified handling in REST controllers.
JSONJacksonJava
0 likes · 8 min read

This article demonstrates how to use Spring Boot 3's @JsonFormat annotation for precise date, time, and enum serialization, covering configuration via properties, annotation attributes, locale settings, shape options, lenient parsing, and case‑insensitive deserialization with practical code examples.
@JsonFormatJacksonJava
0 likes · 8 min read

This article explores common pitfalls in Java date handling—such as non‑thread‑safe formatting and daylight‑saving‑time errors—and presents robust solutions using ThreadLocal, the Java 8 Date/Time API, zone‑aware calculations, caching, and global interceptor patterns to ensure correct, high‑performance time processing in backend systems.
BackendJava 8date-formatting
0 likes · 7 min read

Learn how to use the Linux date command to display, format, and manipulate dates and times, including options for custom strings, file input, relative dates, setting system time, UTC display, and retrieving file modification timestamps, with practical code examples and a comprehensive format table.
date commanddate-formattingsysadmin
0 likes · 9 min read

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.
Backend DevelopmentDateTimeFormatterJackson
0 likes · 12 min read

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.
Backend DevelopmentDateTimeFormatterJackson
0 likes · 12 min read

This article explains PHP's versatile date() function, detailing its syntax, required format parameter, optional timestamp argument, and demonstrates numerous usage examples—including retrieving current date, time, individual components, and formatting specific timestamps—highlighting its importance for backend web development.
BackendDATETIMEPHP
0 likes · 4 min read

This article explains why the legacy java.util.Date and Calendar APIs are problematic, demonstrates common bugs such as integer overflow, year‑format issues, and SimpleDateFormat thread‑safety, and shows how Java 8's immutable java.time classes like LocalDate, LocalDateTime and DateTimeFormatter provide clear, safe, and concise solutions with practical code examples.
DATETIMEJavaJava 8
0 likes · 21 min read

The author recounts a debugging saga with Alibaba's Fastjson library, detailing how a global date‑format setting failed on Linux, how an outdated Fastjson version caused the issue, and how circular‑reference detection with $ref can surprise developers, offering practical solutions and version recommendations.
FastjsonJSON SerializationJava
0 likes · 11 min read

This article explains how using 'YYYY' instead of 'yyyy' in Java's SimpleDateFormat can cause year miscalculations, especially around year-end weeks, demonstrates the issue with sample code, shows correct usage, and warns developers to avoid this subtle bug.
Backend DevelopmentJavaSimpleDateFormat
0 likes · 4 min read

A Java date‑formatting bug occurs when the week‑based year pattern 'YYYY' is used instead of the calendar year 'yyyy', causing dates near year‑end to display the next year, and this article explains the cause, demonstrates it with code, and shows how to avoid it.
BackendSimpleDateFormatYYYY
0 likes · 4 min read

This guide explains how to customize the serialization and deserialization of Date objects in SpringBoot by adjusting application.yml/properties, using @JsonFormat, @DateTimeFormat, and @Temporal annotations, and by creating global converters for both form submissions and JSON payloads, ensuring consistent timezone handling.
Backend DevelopmentGlobal ConverterJackson
0 likes · 12 min read

This article walks through converting a high‑precision timestamp like "2022-03-25 08:00:00.000000000" into a readable Chinese date format using Python's datetime module, offering simpler alternatives to cumbersome string‑splitting tricks.
DATETIMEPandasPython
0 likes · 5 min read

This article walks through a step‑by‑step troubleshooting of MySQL LOAD DATA LOCAL INFILE failures caused by date truncation, quoted CSV fields, and incorrect line terminators, showing how to enable local_infile, use enclosed‑by, @‑variables, and str_to_date to successfully import the data.
CSVLOAD DATAMySQL
0 likes · 12 min read

This article walks through a common Pandas time‑handling issue, showing how to convert a timestamp column to a YYYY‑MM‑DD date format with concise code, complete with example data, output screenshots, and a brief conclusion for Python learners.
PandasPythonTutorial
0 likes · 3 min read

This article explains how using the uppercase YYYY pattern in Java's SimpleDateFormat can incorrectly shift dates to the next year for week‑based years, demonstrates the issue with sample code, and provides guidance to avoid this subtle bug in date handling.
Backend DevelopmentJavabug prevention
0 likes · 4 min read

This article explains the subtle difference between 'yyyy' and 'YYYY' in Java's SimpleDateFormat, demonstrates how using the wrong pattern can cause year miscalculations—especially on December 31st—and provides code examples and a clear explanation to help developers avoid this common bug.
BackendJavaSimpleDateFormat
0 likes · 4 min read

The article explains how using the week‑based year pattern (YYYY) instead of the calendar year pattern (yyyy) in Java's SimpleDateFormat can cause dates like 2019‑12‑31 to be displayed as 2020‑12‑31, illustrating the issue with code examples and a clear explanation of the underlying rules.
BackendJavaSimpleDateFormat
0 likes · 4 min read

The article explains a subtle Java date‑formatting bug where using the week‑based year pattern (YYYY) can incorrectly display the next calendar year for dates at year‑end, demonstrates the issue with sample code, and clarifies why yyyy should be used for ordinary year representation.
BackendYYYYbug
0 likes · 5 min read

The article explains why using the pattern 'YYYY‑MM‑dd' with Java's SimpleDateFormat can produce an incorrect year for dates near the end of the year, demonstrates the issue with a unit test comparing it to the correct 'yyyy‑MM‑dd' pattern, and reveals that the problem stems from the week‑based year semantics of 'Y'.
JavaSimpleDateFormatbug
0 likes · 5 min read

This tutorial explains how to use the Linux date command to show the current time, format dates in various ways, query past or future dates, customize output with format specifiers, set the system clock, and incorporate date values into shell scripts.
Linuxdate commanddate-formatting
0 likes · 7 min read

This article explains how to resolve incorrect date formatting in Laravel notification queries by creating a custom Notification model that uses a HasDateTimeFormatter trait and overriding the notifications() method in the User model.
LaravelNotificationsTraits
0 likes · 3 min read

This article demonstrates how the week‑based year pattern "YYYY" in Java's SimpleDateFormat can incorrectly roll over the year for dates near year‑end, provides a reproducible unit test with code and output, and explains the underlying reason behind the discrepancy.
SimpleDateFormatdate-formattingweek-based-year
0 likes · 4 min read

This article explains the hidden traps of Java's SimpleDateFormat—such as confusing 'y' and 'Y', week‑year calculations, and thread‑safety issues—demonstrates failures with multithreaded parsing, and shows how to replace it with the modern, thread‑safe DateTimeFormatter, including practical code examples and conversion tips.
DateTimeFormatterJavaJava 8
0 likes · 10 min read

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

This article shares practical techniques for handling date and time in Spring Boot projects, including the pitfalls of using SimpleDateFormat, the benefits of @JsonFormat, and two approaches to global configuration that streamline formatting for both java.util.Date and java.time types.
@JsonFormatBackend DevelopmentGlobal Configuration
0 likes · 9 min read

This tutorial demonstrates how to use Python and pandas to clean Excel data by removing duplicate and empty rows, stripping spaces, reformatting date strings, and standardising numeric values with two‑decimal precision and currency symbols, providing complete code examples for each step.
Exceldate-formattingduplicate removal
0 likes · 11 min read

This article explains how to use Java's SimpleDateFormat for date‑time formatting and parsing, describes the pattern letters, clarifies the difference between "yyyy" and "YYYY" for week‑year calculations, and shows how ISO 8601 week definitions are supported in Java with practical code examples.
ISO 8601SimpleDateFormatdate-formatting
0 likes · 8 min read

This article explains why using uppercase YYYY or DD in Java date‑format patterns can produce incorrect results around year boundaries, demonstrates the bugs with concrete code examples, and clarifies the correct usage of lowercase yyyy and dd for calendar dates.
SimpleDateFormatYYYYbug
0 likes · 6 min read

This tutorial explains how Spring Boot automatically configures Jackson's ObjectMapper, shows how to override it with a custom mapper that formats Date fields, and demonstrates both serialization and deserialization of JSON using the customized ObjectMapper in a Spring MVC controller.
JSONJacksonJava
0 likes · 6 min read

A Java developer discovers that formatting dates with the pattern “YYYY‑MM‑dd” causes a year‑off bug on New Year's Day, learns that “YYYY” denotes a week‑based year, and is advised to always use “yyyy‑MM‑dd” for reliable calendar dates.
YYYYbugdate-formatting
0 likes · 4 min read
