Correlating Screenshots and Server Logs Across Timezones | Generated by AI
Got it 👍 – you want to correlate screenshots (from testers uploading into Confluence) with UAT server logs (generated by Java + log4j/slf4j), and the tricky part is the multiple timezones and timestamps.
Let’s break this down carefully:
1. What timestamps do you have?
From the screenshot (Windows):
- The clock visible inside the screenshot taskbar = client machine’s local time (system time, in their timezone).
- The file metadata (if you still have it outside Confluence) may show
Created
/Modified
timestamps = also in that client’s timezone.
From Confluence:
- Upload timestamp = when the attachment hit the Confluence server.
- Usually stored/displayed in server time or converted to Confluence user’s profile timezone.
(You can check your Confluence profile → Settings → Timezone to confirm what you see.)
From UAT logs (log4j/slf4j):
- Timestamps are generated by the Java process JVM timezone (commonly set by server OS default, unless overridden).
- Format is determined by your log pattern (e.g.
yyyy-MM-dd HH:mm:ss,SSS [thread] ...
). Typically this is JVM local time, not UTC, unless explicitly configured.
2. Why things won’t line up directly
- Screenshot shows tester’s local laptop time.
- Confluence stores upload time in server/DB timezone.
- Logs show Java server’s timezone.
These three are not guaranteed to be the same.
3. Method to reconcile
Here’s how to consistently compare a tester’s screenshot with server logs:
- Pick a common time standard – usually UTC
- Convert all relevant timestamps to UTC (Excel, scripting, or by hand).
- This avoids confusion across timezones.
- Check JVM / log timezone
- Confirm in UAT server:
java -Duser.timezone
or check a known log entry vsdate
in Linux. - If logs are not UTC, note offset.
- Confirm in UAT server:
- Check Confluence server/Profile timezone
- Verify whether the upload timestamp you see is already adjusted for your profile timezone.
- Adjust back to raw UTC.
- Align with screenshot clock
- If screenshot shows
2024-02-10 13:45
and you know tester was inAsia/Kolkata (UTC+5:30)
, then that equals2024-02-10 08:15 UTC
. - If logs show an event at
2024-02-10 08:15:23 UTC
, you can match them.
- If screenshot shows
4. Process Workflow (recommended)
- Step 1: Ask testers (or enforce in UAT instructions) to include their timezone/location when uploading screenshots, or even better, request them to set system clock correctly.
- Step 2: When checking logs, first convert screenshot timestamp (tester’s local clock) → UTC.
- Step 3: Convert log timestamp → UTC (by applying JVM’s timezone).
- Step 4: Compare.
5. Example Mapping
-
Screenshot: shows
2024-06-01 14:05
(tester in Berlin, UTC+2).
→ UTC =2024-06-01 12:05
. -
Confluence shows upload =
2024-06-01 12:07 UTC
.
(makes sense – uploaded within ~2 minutes). -
UAT log:
2024-06-01 12:05:20,456 INFO UAT-Service [thread-19] ...
JVM timezone = UTC.
→ Perfect match.
✅ Key Point: You must normalize all timestamps into the same timezone (usually UTC). Windows screenshots show local time. Java logs use JVM timezone. Confluence shows upload time in server or user-profile timezone. Without that normalization, you’ll never align them.
Would you like me to draft a mini playbook for your UAT team, so testers know what to capture (like “always note your timezone when uploading screenshots”) so correlation with logs is easier?