From d50d644abc667b1cefcf30b92fce54d6f243b6e5 Mon Sep 17 00:00:00 2001 From: Gabriel Gonzalez Date: Wed, 16 Sep 2015 11:21:57 -0700 Subject: [PATCH] Fix `readPathsFor` to use the `tz` argument `readPathsFor` is given a timezone argument, but the default implementation internally ignores the argument and hard codes `DateOps.UTC`. This change updates it to thread the time zone argument to `stepSize` and `allPathsWithDuration` --- .../main/scala/com/twitter/scalding/TimePathedSource.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scalding-core/src/main/scala/com/twitter/scalding/TimePathedSource.scala b/scalding-core/src/main/scala/com/twitter/scalding/TimePathedSource.scala index 126a56c4b9..78c4b16426 100644 --- a/scalding-core/src/main/scala/com/twitter/scalding/TimePathedSource.scala +++ b/scalding-core/src/main/scala/com/twitter/scalding/TimePathedSource.scala @@ -46,8 +46,8 @@ object TimePathedSource { * Gives all read paths in the given daterange. */ def readPathsFor(pattern: String, dateRange: DateRange, tz: TimeZone): Iterable[String] = { - TimePathedSource.stepSize(pattern, DateOps.UTC) match { - case Some(duration) => allPathsWithDuration(pattern, duration, dateRange, DateOps.UTC) + TimePathedSource.stepSize(pattern, tz) match { + case Some(duration) => allPathsWithDuration(pattern, duration, dateRange, tz) case None => sys.error(s"No suitable step size for pattern: $pattern") } }