Loading...

The Timezone Trap

A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
medium
Seniority
mid, senior

Problem

All trip timestamps in our ride database are stored in UTC, but the San Francisco ops team keeps asking for monthly counts in local time. A trip completed at midnight UTC on January 1st is still December 31st in California. Given the trip records, count completed SF trips per month using Pacific time.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.