Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7494987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:54:14+00:00 2026-05-29T17:54:14+00:00

For an iPhone chat app I’m working on, I want to know how to

  • 0

For an iPhone chat app I’m working on, I want to know how to handle all the timezone issue.
I mean how to make that when client1 sends a message to client2, they both see the correct time (date) next to the message.

So far this is what i think i need to do:

  1. Client1 send message to server, client1 use it’s local time to present the date next to the message.
  2. The server(c#) gets the message and save it to the database, also he save the current time next to the message with DateTime.UtcNow.
  3. When client2 login, he get the message from the server with the UTC time, and convert it to its local time.

Is this the way to do that?
What is the best way to send the date from server to client? In the server the date is save to the database as DateTime object, to what format can I convert it to send it to the client?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T17:54:19+00:00Added an answer on May 29, 2026 at 5:54 pm

    You have a couple options here depending on how accurate the reported time needs to be:

    1. If it needs to be really accurate, I would rely only on server time. When you sent the message to the server from client1, have the server return the UTC time it associated with the message in its response. So I sent the message “hello” and receive a 200 OK with the UTC time in the response body or in an extended header or something. Then client1 shows this time (converted to local time) and client2 the same time (converted to local time).
    2. If accuracy isn’t as important, it’s easier to just send the message from client1 and then use your local current time. You can still do the UTC thing on the server and have client1 use that time, but this way you don’t need to look at anything in the response to client1’s message.

    In terms of sending dates back and forth, check out the documentation on NSDateFormatter. You can use a format that it can consume easily or do whatever’s easiest on the server and use a custom dateFormat property on the formatter to parse as you please.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a chat client application for iPhone. I've read that the
I am working on a chat client app that connects to a chat server.
I am currently working in small chat app in iPhone. I am call to
I want to create a ChatView exactly like iPhone's texting app (Messages). I'm doing
I want to implement a chat server with many Android/Blackberry/iPhone devices connecting to it.
I am Creating a chat application using XMPP Framework in iPhone. I want to
I am writing an IPhone IM chat window now. You know if the nagviationItem.rightBarItem
I am building a live chat app for the iPhone, and for this it
I'm making a web app and really like the iPhone-style scrollbars that automatically fade
I want to create chat application in iPhone. Are there any framework(s) which support

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.