SnapStream Forums

Go Back   SnapStream Forums > SnapStream Developer Network > Development Discussion
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-29-2005, 11:03 AM
Registered User
 
Join Date: Sep 2003
Posts: 29
BTV Time

When I access the API for upcoming shows I get an xml file showing me everthing I need to know. The only problem is the times. Any time referance looks like this, 127644840000000000, How do I change this to a standard date and time?
Reply With Quote
  #2 (permalink)  
Old 06-29-2005, 01:11 PM
Registered User
 
Join Date: Nov 2003
Posts: 441
Re: BTV Time

To decode time values, do this:

Dim RecordingStart As DateTime
Dim RecordingEnd As TimeSpan

' Get the start time of the recording, adjusted to local time.
RecordingStart = RecordingStart.FromFileTimeUtc(BTV_Recording_Prope rty.Value)
RecordingStart = RecordingStart.ToLocalTime()

' Get the span of the recording.
RecordingEnd = RecordingEnd.FromTicks(CLng(BTV_Recording_Property .Value))

The code above assumes that you've already gotten the property out of the property bag. If not, do something like this:

(excuse the formatting, this board makes a mess of it)

Dim BTV_RecentRecordings_ProperyBagArray() As I_BTV_Scheduler.PVSPropertyBag = BTV_Scheduler.GetRecentRecordings()

If BTV_RecentRecordings_ProperyBagArray.Length = 0 Then
' There are no recent recordings.
Debug.WriteLine("No recent recordings found.")
Else
For Each BTV_RecentRecording As I_BTV_Scheduler.PVSPropertyBag In BTV_RecentRecordings_ProperyBagArray

For Each BTV_RecentRecording_Property As I_BTV_Scheduler.PVSProperty In BTV_RecentRecording.Properties

...the code from the first section of this post...
Next
Next
End IF
__________________
My HTPC:

FRONT-END: uiMimic r6-p4 (Beyond TV Configuration)
BACK-END: Beyond TV
REMOTE CONTROL:Harmony SST-659
OS:Windows XP SP2 | MAINBOARD:ASUS A8V Deluxe | CPU:Athlon 64 3200+ (DUAL CORE) | MEMORY:1 GB
ON-LINE STORAGE:360 GB | OFF-LINE STORAGE:LG Super Multi DVD Drive
VIDEO OUTPUT:ATI All-In-Wonder 9800 PRO (Component Video, 1080i)
VIDEO CAPTURE:3 x Hauppauge PVR-250
HOME THEATRE:Toshiba 42H83 42" HDTV, Yamaha HTR-5760 AV Receiver, Harman Kardon DVD-22 DVD Player
Reply With Quote
  #3 (permalink)  
Old 06-29-2005, 08:57 PM
Registered User
 
Join Date: Sep 2003
Posts: 29
Re: BTV Time

unfortunately I'm not using .net so that won't help me very much. I just need to know what the system is based on and I can hopefully translate it.
Reply With Quote
  #4 (permalink)  
Old 06-30-2005, 07:20 AM
Administrator
 
Join Date: Dec 2004
Location: Houston, TX
Posts: 2,302
Send a message via AIM to Kilrsat
Re: BTV Time

Its either a windows timestamp, in ticks, or a .net DateTime object in ticks. I believe its the windows timestamp, but I'll give you both definitions.

fileTime is a 64-bit signed integer value representing a Windows file timestamp. The timestamp is the number of 100-nanosecond intervals that have elapsed since January 1, 1601 A.D. (C.E.) 12:00 A.M. coordinated universal time (UTC).

DateTime.Ticks:
The value of this property is the number of 100-nanosecond intervals that have elapsed since 12:00 A.M., January 1, 0001.
Reply With Quote
  #5 (permalink)  
Old 06-30-2005, 10:23 AM
Registered User
 
Join Date: Nov 2003
Posts: 441
Re: BTV Time

As Kilrsat said.

I believe that its #1 (a 64-bit signed integer value equal to the number of 100ms intervals sicnd 1-1-1601 00:00 UTC.

Decoding that will be annoying, I'm sure, since you will need to probably resolve that value to years, months, days, hours, minutes, seconds, and milliseconds and then use whatever date library you have available to you to add those values to 1-1-1601 00:00. Alternatively, if your date library is good, it might allow you to work with the filetime structure directly.
__________________
My HTPC:

FRONT-END: uiMimic r6-p4 (Beyond TV Configuration)
BACK-END: Beyond TV
REMOTE CONTROL:Harmony SST-659
OS:Windows XP SP2 | MAINBOARD:ASUS A8V Deluxe | CPU:Athlon 64 3200+ (DUAL CORE) | MEMORY:1 GB
ON-LINE STORAGE:360 GB | OFF-LINE STORAGE:LG Super Multi DVD Drive
VIDEO OUTPUT:ATI All-In-Wonder 9800 PRO (Component Video, 1080i)
VIDEO CAPTURE:3 x Hauppauge PVR-250
HOME THEATRE:Toshiba 42H83 42" HDTV, Yamaha HTR-5760 AV Receiver, Harman Kardon DVD-22 DVD Player
Reply With Quote
  #6 (permalink)  
Old 08-25-2009, 06:22 AM
Registered User
 
Join Date: Oct 2005
Posts: 34
Re: BTV Time

Here's a non .NET solution in VBA/VB6 [addon] BTV Command Line Tools
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AGP and PCI at the same time? RogersRanger Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum 3 08-25-2006 09:08 PM
time to ask about the PVR-500 again crowne77 Beyond TV and Beyond TV Link 9 09-17-2005 10:52 PM
Recording and Time-shifting at the same time nupurina Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum 2 01-17-2004 08:35 AM
Long "initializing" time and long "List Shows" load time MattSmith Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum 3 10-29-2001 01:48 PM
Video stops for a moment from time to time Uwe Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum 0 05-13-2001 03:00 AM


All times are GMT -6. The time now is 05:15 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.0 RC1
©2004-2009 Snapstream Media