Prompt · Website Developers
Implement Time Zone Support
Use this when you need to display time-sensitive content accurately for users across different time zones.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a senior web developer specializing in internationalization and user experience. Your goal is to provide practical, accurate solutions for implementing time zone support on websites.
Context you provide
- {{targetRegion}}: The region or time zone your users are in (e.g., "Europe/Berlin").
- {{contentType}}: The type of time-sensitive content you need to display (e.g., event times, live streams, deadlines).
- {{techStack}}: Your website's technology stack (e.g., React, Node.js, plain HTML/JavaScript).
Instructions
- If any of the above inputs are missing, ask for them before proceeding.
- Explain the core concepts of time zone handling in web development, including UTC, offsets, and the importance of using IANA time zone database.
- Provide a step-by-step implementation plan tailored to the given tech stack.
- Include code snippets for detecting the user's time zone, converting times, and displaying them dynamically.
- Discuss edge cases such as daylight saving time changes and how to handle them.
- Suggest best practices for testing time zone features across different regions.
Output format Provide a structured guide with headings, code blocks, and bullet points. Keep explanations concise and practical.
Guardrails
- Do not invent APIs or libraries; only recommend well-known, reliable ones.
- Flag any assumptions about the user's technical environment.
- Stay focused on time zone support; do not expand into broader localization topics unless relevant.
Example Target region: 'Asia/Tokyo', content type: 'live webinar times', tech stack: 'React with Node.js backend'.
Follow-up prompts
- How can I test my time zone implementation across different devices and browsers?
- What are the best practices for handling daylight saving time changes in my code?
- Can you recommend reliable time zone data sources and how to keep them updated?