Dave:

Have you looked at Wx::DateTime::Now()?

I looked in WxDemo and found:

    my $date = Wx::DateTime::Now();
    $date->FormatDate()
    $date->FormatTime()

There are a lot of accessor methods listed in the wxWidgets docs.

James


On Wed, Dec 31, 2014 at 5:29 PM, Dave Hayes <d...@jetcafe.org> wrote:

> Maybe I'm dense, but I have searched a lot for how to get the time_t value
> -out- of a Wx::DateTime object. I've tried GetTicks() which is in the docs,
> but this method is not in the Perl version of this. I even tried
> unreferencing the scalar reference.
>
> The only (untested at the moment) idea I can come up with is:
>
>   $dt_object = $some_date_picker_ctrl_widget->GetValue(); # because
> GetDate() doesn't work
>   $now = time();
>   $timespan = $dt_i_want->Subtract(Wx::DateTime->new($now));
>   $the_time_i_want = $timespan->GetValue() + $now;
>
> Am I missing something?
>
> Thanks in advance.
> --
> Dave Hayes - Consultant - Altadena CA, USA - d...@jetcafe.org
> >>>> *The opinions expressed above are entirely my own* <<<<
>
> "In theory, there is no difference between theory and practice.
>  In practice, there is."
>                                  -- Jan L. A. Van De Snepscheut
>

Reply via email to