[Spce-user] CDR Date

Andreas Granig agranig at sipwise.com
Sat Aug 11 06:45:43 EDT 2012


Hi Michael,

On 08/10/2012 10:46 PM, Michael Molina wrote:
> Heloo to all I have been trying to make my old CDR report work with
> version 2.5. My problem continues to be the Init time
> or start time od the call. Both dates are in the Unix format. I tried
> all types of conversion methods and sometimes I get the wrong date.

In mysql itself, just compare your results which you're getting
somewhere else (I suppose via SOAP?) with this query:

select from_unixtime(start_time) from cdr where id = <the id to check>

If the mysql query produces the correct result, you've an issue
somewhere else. Note that the result of conversions from unix timestamp
to a string representation depend on the timezone setting of the
machines you're doing it (which was one of the reasons we actually
switched to unix timestamps, see below).

> It could be a day ahead and sometimes is perfect, if I change the type
> at the table, I simply mess everything up. Can we go back
> to the old format (human format) somehow?

No, the reason we've switched to unix timestamps is for adding
milliseconds granularity, but more importantly also to support different
time zones, especially when it comes to daylight saving time switches.

> I need the start time so on our report form (Visual Basic form or
> Microsoft Access) a user could select a From and To date to
> generate a report.

Haven't done any VB programming, but something like this seems to work,
no?
http://www.digitalcoding.com/Code-Snippets/VB/Visual-Basic-Code-Snippet-Convert-Unix-timestamp.html

Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20120811/3badf985/attachment-0001.asc>


More information about the Spce-user mailing list