Member Avatar for m.a.u.

Greetings everybody,

I have been trying to convert UTC time into local time.

Using ctime library, time_t, gmtime etc. But I am having nothing.

When I searched the web, I saw nothing but examples with this library...

I would like to ask you how could I convert UTC, a double , into local time?

By the way, I am reading UTC data from a file, in String^ format. And having run-time error...

I would be pleased if you could give me a hint.

Thanks in advance

Recommended Answers

All 5 Replies

Member Avatar for m.a.u.

Might I ask you how I could convert String^ into time_t format?

This will probably solve my problem.

Thanks

Since you're already using C++/CLI, why not initialize a DateTime object with the String^ and then use the ToLocalTime method?

What exactly does the string contain? Is it a standard UTC format?

Member Avatar for m.a.u.

Deceptikon,

Thank you for your answer.

The content of the String^ is a number similar to "077243532.949" .

ctime/time.h have not worked,yet.

Thank you

Is that a Julian date format? I was assuming you had something like an ISO 8601 formatted date, but this complicates matters.

Member Avatar for m.a.u.

Deceptikon,

Thanks for your answers. It is exactly the current clock info. I need to only seperate data properly. So, this problem is solved.

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.