我试图将changeset.yaml文件包含到Liquidbase的changelog.yaml中.
文件changelog.yaml
databaseChangeLog:
- include:
file: migrations/changeset.yaml
Run Code Online (Sandbox Code Playgroud)
changeset.yaml
changeset:
id: 1
author: vlad
Run Code Online (Sandbox Code Playgroud)
执行更新时获取此信息
Unexpected error running Liquibase: Could not find databaseChangeLog node
Run Code Online (Sandbox Code Playgroud)
有什么想法吗?谢谢.
更新:如果我使用xml格式似乎是相同的.
我需要找到时间点,接下来是早上7点在奥克兰(新西兰)
我正在使用joda-time 2.6
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.6</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
使用以下测试时
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
public class FindDateTimeInFuture {
static DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss.SSS z Z");
public static void main(String[] args) {
// Use UTC as application wide default
DateTimeZone.setDefault(DateTimeZone.UTC);
System.out.println("now UTC = " + formatter.print(DateTime.now()));
System.out.println("now in Auckland = " + formatter.print(DateTime.now(DateTimeZone.forID("Pacific/Auckland"))));
System.out.println("7 AM Auckland = " + formatter.print(DateTime.now(DateTimeZone.forID("Pacific/Auckland")).withTime(7, 0, 0, 0)));
}
}
Run Code Online (Sandbox Code Playgroud)
如果我在奥克兰的午夜之后运行上述内容,那很好,就是这样
now UTC = 2016-09-01 13:37:26.844 UTC +0000 …Run Code Online (Sandbox Code Playgroud)