Project Detail

C# TimeZoneConverter Method  

C# TimeZoneConverter Method is project number 402101
posted at Freelancer.com. Click here to post your own project.

 

| More Free Trial For New Buyers
 

Status:

Selected Providers: XpertzDotNet

Budget: $30-250

Created: 03/15/2009 at 0:20 EDT

Bid Count: 13

Average Bid:
N/A

03/16/2009 at 0:20 EDT

Project Creator: obinna
Employer Rating: 10/1010/1010/1010/1010/1010/1010/1010/1010/1010/10 (13 reviews)

Bid On This Project
 

Description

I need a C# Timezone Con.verter that will accept a Date, Current TimeZone and Actual Time, it will return a string.
Make sure you treat the IsDaylight feature (the tricky part)
Please USE C# 3.5 because it supports the feature, pls test well before you deliver. I will check it

My budget is $40.00 for this

string g = TimeZoneConverter("15 Mar 2009 03:56:20", "GMT Standard Time", "US Mountain Standard Time");

using System.Collections;
using System.Collections.Generic;
using System.Globalization;

public string TimeZoneConverter(string myDate, string FromTimeZoneID, string ToTimeZoneID)
{
//DaylightTime changes = TimeZone.CurrentTimeZone.GetDaylightChanges(??);
//changes.Start;
//changes.End;
//bool IsDaylightSavingTime = System.TimeZone.CurrentTimeZone.IsDaylightSavingTime(newTime)

TimeZone zone = TimeZone.CurrentTimeZone;
string StandardName = System.TimeZone.CurrentTimeZone.StandardName;
CultureInfo myCulture = new CultureInfo("en-GB");
DateTime st = DateTime.Parse(myDate,myCulture.DateTimeFormat);
int Year = st.Year;
int Month = st.Month;
int Day = st.Day;
int Hour = st.Hour;
int Minutes = st.Minute;
int Seconds = st.Second;

DateTime oldTime = new DateTime(Year,Month,Day,Hour,Minutes,Seconds);
TimeZoneInfo timeZone1 = TimeZoneInfo.FindSystemTimeZoneById(FromTimeZoneID);
TimeZoneInfo timeZone2 = TimeZoneInfo.FindSystemTimeZoneById(ToTimeZoneID);
DateTime newTime = TimeZoneInfo.ConvertTime(oldTime, timeZone1, timeZone2);

return newTime.ToString();
}

Job Type

See more: day, hour, month, test

Messages Posted:0 View project clarification board Post message on project clarification board

Bid On This Project
 

If you are the project creator or one of the bidders Log In for more options

Bids are hidden by the project creator. Log in as the project creator or as one of the bidders to view bids. You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.


    Bid on this Project