English 中文(简体)
出生日
原标题:Birthday Reminder
  • 时间:2010-07-21 08:34:55
  •  标签:
  • c#

i have implemented a windows service which is for user s birthday reminder. at midnight this service sends a mail to the respective person who has birthday on that particular day. This is for users in India...

Now my requirement is to make that service for all users in the world... so what should I enhance in that service...? Because Indian time is different than other countries timings... If i fire that service at mid night as per indian time..it is possible that in india midnight means different timings in other countries... Plz suggest me a solution.

最佳回答

最好的办法是保持美洲金枪鱼委的时间。 在这种情况下,你可以按照要求将时间重新改为区域时间。

问题回答

在标签上显示出生日提醒

    DateTime birthday = Convert.ToDateTime("1991/12/24");
    int years = DateTime.Now.Year - birthday.Year;
    birthday = birthday.AddYears(years);
    DateTime check = DateTime.Now.AddDays(7);
    if ((birthday > DateTime.Now) && (birthday < check))
    {
        lbbirthday.Text = ("This week is your birthday !!!");
    }

详情请上 Birth 出生日催复通知,如p.net c#

你们需要储存用户的时间区,以抵消和增加/向当地时间提供时间,了解在电子邮件上打多少时间。

但是,如果电子邮件在很晚或很早的几小时抵达,用户真心实意是会谨慎的,基本上仍然是当天。

参看here用于时间区转换。 但是,你们知道谁是谁? 如果是,它存放在某个地方,你会在该地点检查,并寄送电子邮件。

Mate, you are talking to programmer s. 99.9% of them are aware that there are different time-zones in the world. If you have information about the user s locations, you can use the information in this question to prove in which timezone a user lives and send the message an the timezone s midnight time: Web service - current time zone for a city?





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签