Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Adjusting to user's local time

 
   Database Help (Home) -> Notification Services RSS
Next:  NSRuleFiring_SPID Contains no data - No data in N..  
Author Message
Andy

External


Since: Jul 12, 2007
Posts: 4



(Msg. 1) Posted: Tue Jul 10, 2007 7:27 am
Post subject: Adjusting to user's local time
Archived from groups: microsoft>public>sqlserver>notificationsvcs (more info?)

Hi,

I have a notification I'm sending out, and I'm storing an expiration
date as UTC. I'd like to format this to the user's local time based
on the subscriptions timezone setting.

I can figure out how to do this, but I'd be tapping into NS' timezone
tables and I'd like to confirm that this is an appropriate way to
handle this task.

Thanks
Andy

 >> Stay informed about: Adjusting to user's local time 
Back to top
Login to vote
Andy

External


Since: Jul 12, 2007
Posts: 4



(Msg. 2) Posted: Mon Jul 23, 2007 7:45 am
Post subject: Re: Adjusting to user's local time [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jul 19, 8:18 am, Todd C <To....RemoveThis@discussions.microsoft.com> wrote:
> Why not do this:
>
> [Expiration in Local Time] = DateAdd(hour, DateDiff(hour, GETUTCDATE(),
> GETDATE()), [Expiration in UTC Time])
>
> One caution: This only applies to records where the [Expiration Date] is in
> the same Daylight Savings timeframe as the current date. In other words, this
> is accurate if you are looking at an [Expiration Date] coming up in a week.
> But if you are looking at an [Expiration Date] that will be in, say, November
> or December (after the U.S. has gone off Daylight Savings Time) then you will
> be off by one hour.
>
> The choice is yours: If that one hour difference is acceptable for 6 months
> out of the year, then it will work. If not, you will need to figure out
> something else.

Well the problem is that users may be in China, France, or Germany,
and this only accounts for users in the same timezone in which the
server is located.

 >> Stay informed about: Adjusting to user's local time 
Back to top
Login to vote
Todd C

External


Since: Jan 31, 2007
Posts: 89



(Msg. 3) Posted: Mon Jul 23, 2007 8:04 am
Post subject: Re: Adjusting to user's local time [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Andy:

Fair enough.

Can we assume that a user in one particular time zone will ALWAYS be in that
particular time zone? If so, you may need to capture the time difference as
part of the subscription. I believe Windows time zone tables include an
integer field that would indicate this.

Sorry that I cannot take you any further. I don't have experience or
knowledge of how to tap into the OS to get something like that.

If the user signs up for the subscription while in China, and expects the
notification to be formatted correctly for him while he just happens to be in
Athens, then you REALLY have your work cut out for you.

Things were SO much simpler when the world was FLAT

Smile

--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"Andy" wrote:

> On Jul 19, 8:18 am, Todd C <To... DeleteThis @discussions.microsoft.com> wrote:
> > Why not do this:
> >
> > [Expiration in Local Time] = DateAdd(hour, DateDiff(hour, GETUTCDATE(),
> > GETDATE()), [Expiration in UTC Time])
> >
> > One caution: This only applies to records where the [Expiration Date] is in
> > the same Daylight Savings timeframe as the current date. In other words, this
> > is accurate if you are looking at an [Expiration Date] coming up in a week.
> > But if you are looking at an [Expiration Date] that will be in, say, November
> > or December (after the U.S. has gone off Daylight Savings Time) then you will
> > be off by one hour.
> >
> > The choice is yours: If that one hour difference is acceptable for 6 months
> > out of the year, then it will work. If not, you will need to figure out
> > something else.
>
> Well the problem is that users may be in China, France, or Germany,
> and this only accounts for users in the same timezone in which the
> server is located.
>
>
 >> Stay informed about: Adjusting to user's local time 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
time event? - Hi, I have some data in my database which stores when a contract expires. I'd like to send a notification 90, 60 and 30 days before the contract will expire. I'm having trouble coming up with a good event to trigger notifications. Do I setup the event...

scheduled subscriptions with user defined logic - Hello all, While compiling my ADF I am getting the foll. error: Notification Services could not obtain an identifier needed to construct a Transact-SQL statement I am trying to create an scheduled subscription with a user-defined rule. I followed the....

What is the best way to implement a 1 time match for a Sub.. - I would like to create a subscription that once a Notification is generated for the subscription it becomes disabled. If there a way to do this automatically? If not, any recommendations? FYI.. We do have our own custom formatter and delivery..

UTC & daylight savings/standard time - We manage tasks through NS. We explicitly store our Subscription.ScheduleStart time as UTC. Perhaps we were convinced from the documentation that shifts from daylight savings time to standard (and vice versa) would be handled correctly (I wasn't..

SSNS Security using installation user acct not service acct - We have SSNS app that updates a different database from changes in another. After installing it always inserts data as my user acct but NOT the svc defined in ICF. we have custom SQL server del protocol and channels. I have added a runas to top of the ....
   Database Help (Home) -> Notification Services All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]