I got the error when parsing the datetime value from the Postgresql database. The value is 0001-01-01 00:00:00, so gorm can't convert it to the time.Time object. I just searched and read some related issues but I can't resolve it.

Error message: convert field 7 failed: parsing time "0001-01-01 00:00:00 BC": extra text: " BC"

Table in the database: cp_campaign: ```Name |Value | ------------+-----------------------+ cp_id |565 | org_id |10 | name |Resell ME | owner |100000 | status |31 | startdate |2020-07-09 16:00:21.000| stopdate |0001-01-01 00:00:00.000| createby | | createdate |2020-07-09 16:00:31.537| modifyby | | modifydate |2020-07-09 16:47:57.925| cp_cat |2 | cp_subcat |1 | tag_value_id|1 |


**Defined model:**
```golang
type Campaign struct {
    CampaignId  int64      `json:"cp_id" gorm:"column:cp_id"`
    OrgId       int32      `json:"org_id" gorm:"column:org_id"`
    Name        string     `json:"name" gorm:"column:name"`
    Owner       int32      `json:"owner" gorm:"column:owner"`
    Status      int32      `json:"status" gorm:"column:status"`
    Category    int32      `json:"cp_cat" gorm:"column:cp_cat"`
    SubCategory int32      `json:"cp_subcat" gorm:"column:cp_subcat"`
    StopDate    *time.Time `json:"stopdate" gorm:"column:stopdate"`
}

func (Campaign) TableName() string {
    return "cp_campaign"
}

Read data from the database:

func Test() {
    dns := fmt.Sprintf("host=%v port=%v dbname=%v user=%v password=%v sslmode=disable TimeZone=Asia/Bangkok",
        config.GetEnv().DbHost,
        config.GetEnv().DbPort,
        config.GetEnv().DbName,
        config.GetEnv().DbUser,
        config.GetEnv().DbPassword,
    )

    // We are using pgx as postgres’s database/sql driver
    // it enables prepared statement cache by default
    db, err := gorm.Open(
        postgres.New(postgres.Config{
            DSN:                  dns,
            PreferSimpleProtocol: true, // disables implicit prepared statement usage
        }),
        &gorm.Config{
            QueryFields: true,
        },
    )

    if err != nil {
        logrus.Panicf("connect DB error: %v", err)
    }

    logrus.Infof("Connected to the database %v:%v", config.GetEnv().DbHost, config.GetEnv().DbPort)

    var campaign Campaign
    queryErr := db.Model(Campaign{}).Where(Campaign{CampaignId: 565}).First(&campaign).Error
    logrus.Error(queryErr)
}

Comment From: github-actions[bot]

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking

Comment From: shiyao-afterpay

Please verify again with "PreferSimpleProtocol" being false.