summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/WebService/ForecastIo/Alert.pm4
-rw-r--r--lib/WebService/ForecastIo/DataPoint.pm4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/WebService/ForecastIo/Alert.pm b/lib/WebService/ForecastIo/Alert.pm
index 37ff4ac..d402fa2 100644
--- a/lib/WebService/ForecastIo/Alert.pm
+++ b/lib/WebService/ForecastIo/Alert.pm
@@ -2,6 +2,7 @@ package WebService::ForecastIo::Alert;
use Moose;
use Moose::Util::TypeConstraints;
use MooseX::Types::URI 'Uri';
+use MooseX::Types::DateTime;
class_type 'WebService::ForecastIo::Alert';
@@ -25,7 +26,8 @@ has title => (
has expires => (
is => 'ro',
- isa => 'Int', # time!
+ isa => 'DateTime',
+ coerce => 1,
);
has uri => (
diff --git a/lib/WebService/ForecastIo/DataPoint.pm b/lib/WebService/ForecastIo/DataPoint.pm
index c05e981..ba06fa1 100644
--- a/lib/WebService/ForecastIo/DataPoint.pm
+++ b/lib/WebService/ForecastIo/DataPoint.pm
@@ -1,6 +1,7 @@
package WebService::ForecastIo::DataPoint;
use Moose;
use Moose::Util::TypeConstraints;
+use MooseX::Types::DateTime;
class_type 'WebService::ForecastIo::DataPoint';
@@ -22,7 +23,8 @@ has [qw( time
precipIntensityMaxTime
temperatureMinTime temperatureMaxTime )] => (
is => 'ro',
- isa => 'Int', # time!
+ isa => 'DateTime',
+ coerce => 1,
);
has [qw(summary icon precipType)] => (