11-12-2012 05:34 AM
Hello crossrulz,
I am attaching the VI. Please let me know where i am commiting the mistake.
I thinks this 1460 is the number of days from 1904(365*4)
Thanks,
11-12-2012 07:29 AM
What values are you getting as a result? It comes out right for me. Again, what time zone are you in?
11-15-2012 12:01 AM
How to find the current time zone ?
& i think becasue of this experiment my current time zone(Whatever this was) spoiled. for time stmap 05-11-12 14:20:00 my number of second was 3419571000 & it was working perfectly from last 1.5 years. But now if i am converting this number of seconds to time than result is 11-05-12 14:20:00(date & month is interchanged).
Please help me to overcome this.
Thanks
11-15-2012 12:03 AM
My current time zone is "(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi".
Ranjeet
11-15-2012 06:12 AM
The TZ offset can be determined by comparing UTC time to local time.
In some timezones, Daylight Savings is practiced. The reasons are historical, but the important thing to understand is that the offset depends on the actual date. If it falls in the standard period of the year there is no offset. If the timestamp occurs in the 'savings time' period, you must adjust the offset.
I've attached a VI that will calculate the TZ seconds offset for a specified date. (LabVIEW 8.6)
11-15-2012 07:11 AM
@PhillipBrooks wrote:
The TZ offset can be determined by comparing UTC time to local time.
In some timezones, Daylight Savings is practiced. The reasons are historical, but the important thing to understand is that the offset depends on the actual date. If it falls in the standard period of the year there is no offset. If the timestamp occurs in the 'savings time' period, you must adjust the offset.
I've attached a VI that will calculate the TZ seconds offset for a specified date. (LabVIEW 8.6)
That's a handy little VI. I'll have to keep that one around.
Ranjeet - As I said, I'm in Eastern Time, which is UTC-5 hours. Which means the calculation is 10.5 hours off for you. Use philip's VI to find your offset and put that in for the time zone constant.
11-15-2012 09:52 PM
HI PhillipBrooks & crossrulz,
In my PC for the current time stamp the output of your VI is -19800. That is number of seconds for time 05:30:00. As this is perfect becasue i am working on UTC+5:30. Thanks for answer.
But please let me know why my number of second for specific time stamp is changed which was working before. I never changed anything in my OS time setting. and now in the output time for the same input only minute & hour is interchaged. This is something logical. Please help me to understand this.
Thanks.
11-15-2012 10:03 PM - edited 11-15-2012 10:05 PM
Just take a look at my VI & run it.
11-15-2012 10:20 PM
Hey sorry friends,
Acutually this problem is coming when i am exporing excel from .net application. Can you please tell me why this problem is arised ?
In the labview platform its perfectly working(Thank to labview )
11-17-2012 04:43 PM
LabVIEW is working perfectly. I don't see anything wrong with your VI besides the mini-race condition where the initial value of zero in the control to be read and used before the VI has a chance to set the control by way of the local variable.